-
Notifications
You must be signed in to change notification settings - Fork 37
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
server: Add root-cause-exception-first logging to logback.xml #58
Conversation
This change helps identify the root cause in the stack trace of exceptions. Ref: Github issue #57
I need some help with testing this. I couldn't setup the environment on my PC (xsn rpc wasn't installing). I'm working on it. |
Then, an exception should be thrown (which is what we want to see). Thanks. |
I finally got rpc server to run. Sorry for the time taken. Error caused by : No database details in The difference is evident with
Files : |
Ref: Github issue #57
Problem
There's always trouble in finding the root cause of an exception because java prints the stack trace in last-exception-first order. Hence, root-cause-exception-first logging would help identify the root cause faster.
Solution
Added
%rEx
conversion word to the encodern Pattern Layout.Reference :
Logback docs (Chap 6 : Layouts)
Blog/Recipe referenced in the documentation
Result
Outputs the stack trace of the exception associated with the logging event, if any. The root cause will be output first instead of the standard "root cause last"
No