Replies: 1 comment
-
Related to LOGBACK-1719 |
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
-
Hi,
I've opened a discussion in the slf4j github but perhaps it is more relevant here.
Logback offers to implement TurboFilters (https://logback.qos.ch/manual/filters.html#TurboFilter).
If I'm logging something with the old slf4j 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.
Is there a way to use the new fluent API and have my TurboFilter work as intended ?
Beta Was this translation helpful? Give feedback.
All reactions