Logging exceptions with SLF4J #5873
Unanswered
4e6
asked this question in
Work In Progress - Engine
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
SLF4J
Logger
interface provides several methods for logging errors.It may look misleading as one can decide that you can either use a template string with arguments or log the exception.
In reality, SLF4J allows passing exception objects to the first method, assuming the exception is the last argument.
Notice that the second template parameter is not expanded
This is something I didn't know and just wanted to share. The behavior is described here https://www.slf4j.org/faq.html#paramException
Beta Was this translation helpful? Give feedback.
All reactions