-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: log stacktrace #3418
feat: log stacktrace #3418
Conversation
Native tests failed:
This is irrelevant to this feature. |
@@ -179,6 +181,10 @@ private void logWarning( | |||
} else { | |||
LOGGER.warn(re.getMessage()); | |||
} | |||
// Log the stacktrace for troubleshoot. | |||
StringWriter stringWriter = new StringWriter(); | |||
re.printStackTrace(new PrintWriter(stringWriter)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not threadsafe -- we probably don't want this here. Logging is the goal.
// Log the stacktrace for troubleshoot. | ||
StringWriter stringWriter = new StringWriter(); | ||
re.printStackTrace(new PrintWriter(stringWriter)); | ||
LOGGER.warn(stringWriter.toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would duplicate the log entry since we're already sending a log above. Can we adjust the log messages above, instead? For example, LOGGER.warn("Message", exception)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks, I wasn't aware there's a LOGGER.warn(String, Exception)
method.
Quality Gate passedIssues Measures |
Fix: #3402