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
Just noticed
val e = new RuntimeException(...)
log.info(s"exc: $e")
and
log.info(s"exc: ${e.toString}")
end up with different log messages.
Due to string interpolation conversion error, first one produces:
"exc: {}
java.lang.RuntimeException: Exception
at ...
"
Probbably $e is not treated as argument to slf4j's interpolation, but as exception argument.
So interpolation doesn't work, and one gets unwanted stacktrace.
marcin
The text was updated successfully, but these errors were encountered:
val abc = "ABC"
val ex = new RuntimeException("Exception")
log.error(s"1: $ex")
log.error(s"2: ${ex.toString}")
log.error(s"3: $ex, $abc")
log.error(s"4: $abc, $ex")
Just noticed
val e = new RuntimeException(...)
log.info(s"exc: $e")
and
log.info(s"exc: ${e.toString}")
end up with different log messages.
Due to string interpolation conversion error, first one produces:
"exc: {}
java.lang.RuntimeException: Exception
at ...
"
Probbably $e is not treated as argument to slf4j's interpolation, but as exception argument.
So interpolation doesn't work, and one gets unwanted stacktrace.
marcin
The text was updated successfully, but these errors were encountered: