Open
Description
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
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.