Skip to content

Commit

Permalink
TEZ-4039: Addendum: Tez should inject dag id, query id into MDC.
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushtkn committed Jan 8, 2024
1 parent 2dcdeba commit 26c8737
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ public static ThreadLocalMap setupLog4j() {
mdcField.set(null, mdc);

} catch (Exception e) {
LOG.warn("Cannot set log4j global MDC, mdcContext won't be applied to log4j's MDC class", e);
if (LOG.isDebugEnabled()) {
LOG.debug("Cannot set log4j global MDC, mdcContext won't be applied to log4j's MDC class", e);
} else {
LOG.warn("Cannot set log4j global MDC, mdcContext won't be applied to log4j's MDC class: {}", e.getMessage());
}
}

return mdcContext;
Expand Down

0 comments on commit 26c8737

Please sign in to comment.