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
Added configuration to embed exception in message instead of using printStackTrace #2051
Conversation
46bcf9b
to
d20a47d
Compare
} | ||
|
||
expect: | ||
outputStream.toString() ==~ /^.* ERROR foo - log \[exception:java\.io\.IOException: wrong\]\[stack:\[.*\]\]\n$/ |
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.
just curious: will this format be compatible with IntelliJ analyse window?
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.
good idea! I'll check and in case try to format in a compatible way
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.
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.
If you add a space following exception:
and remove the surrounding brackets, would that work? Seems like simple normalization (without editing the text) would be a useful attribute
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.
Oh, looks like maybe you fixed it below...
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.
Yes, it works by just pasting the whole logline, no additional cleaning needed
Changed the structure of the log to support pasting it in IntelliJ stack strace analyzer
To avoid receiving the stack trace over multiple lines and send receive it as a single message I have added an option (
embedException
, which defaults to false for backward compatibility).The format in case this feature is enabled looks like
where the content of the exception tag can be pasted in IntelliJ stack analyzer too.