Replies: 1 comment
-
|
This issue is closely related to logback/871. I am closing this discussion as a duplicate. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
don't know if it's more a Logback issue or an slf4j one.
Logback offers to implement TurboFilters (https://logback.qos.ch/manual/filters.html#TurboFilter).
If I'm logging something with the old API just like :
then slf4j just call the error method of the underlying logger implementation.
With Logback it's something like :
As you can see, the turboFilterChain is called with all the information passed to the method.
But if I'm logging something with the fluent API juste like :
then slf4j call the 'log' method of the underlying logger implementation.
This implementation completely bypass the TurboFilter chain.
The TurboFilter is still called when the "atError" method is called because the 'isErrorEnabled' method call it but at this step there is no information available about the message or exception to log.
To conclude, the fluent API does not seem really backward compatible, at least with Logback :/
Beta Was this translation helpful? Give feedback.
All reactions