You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
slf4j interprets last message formatting argument as exception to be attached to log entry.
Even if message format string has placeholder for it - producing message with empty placeholder, and unwanted stacktrace.
val ex = new RuntimeException("XXX")
val item = Item(123)
log.warn(s"Processing issue; ex=$ex, item=$item") // this works fine
log.warn(s"Processing issue; item=$item, ex=$ex) // and this produces "... item=Item(123), ex={}" followed by stacktrace
I think it should be fixed upstream, but maybe we could apply some simple workaround for now - such as appending "null" to formatting args if no exception is provided explicitly.
m.
The text was updated successfully, but these errors were encountered:
slf4j interprets last message formatting argument as exception to be attached to log entry.
Even if message format string has placeholder for it - producing message with empty placeholder, and unwanted stacktrace.
See slf4j issue
I think it should be fixed upstream, but maybe we could apply some simple workaround for now - such as appending "null" to formatting args if no exception is provided explicitly.
m.
The text was updated successfully, but these errors were encountered: