I have a strange logs from logback. All messages (each row) followed by [jar name] like this:
13:19:45 ERROR [c.o.s.w.s.Class] lalalalal [module-version.jar]
The pattern is:
<pattern>%d{HH:mm:ss,SSS} %-5p [%c{3}] %m%n</pattern>
I've searched on logback site but didn't find anything. This suffix is messing stacktrace so how can I hide it?
P.S. Sorry for my english:)
It is indeed a feature as others have noted. However, if needed, it can be disabled.
You can disable it by adding %ex
at the end of the pattern, so %d %logger - %m%n
should be rewritten as %d %logger - %m%n%ex
. In your case, I think this should be the correct form, if you want to disable it:
<pattern>%d{HH:mm:ss,SSS} %-5p [%c{3}] %m%n%ex</pattern>
This might be even needed for some situations where this information causes siginificant overhead, although I would personally leave it on and rather change the environment or the IDE.
EDIT: and yes, the %ex
is documented.
That's a feature. In case of errors logback gives you the exact name of the jar from which the error originates, which may be useful to diagnose classpath problems. You can read more about it here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With