Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
StrikeW committed Dec 16, 2024
1 parent ffad711 commit 79cc63b
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ private void logIfEnabled(int level, String msg) {

private void logIfEnabled(int level, String format, Object arg) {
if (TracingSlf4jImpl.isEnabled(level)) {
TracingSlf4jImpl.event(
name, level, new ParameterizedMessage(format, arg).getFormattedMessage());
var pm = new ParameterizedMessage(format, arg);
if (null != pm.getThrowable()) {
logIfEnabled(level, pm.getFormattedMessage(), pm.getThrowable());
} else {
TracingSlf4jImpl.event(name, level, pm.getFormattedMessage());
}
}
}

Expand Down

0 comments on commit 79cc63b

Please sign in to comment.