Skip to content

Commit 5bcd4ee

Browse files
committed
add comment.
1 parent ee3643d commit 5bcd4ee

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

oauth2_http/java/com/google/auth/oauth2/Slf4jUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ static void logWithMDC(
142142
// Default to DEBUG level
143143
}
144144
if (!contextMap.isEmpty()) {
145+
// MDC carries contextual information in log messages.
146+
// It is tied to thread, and is safer to clear it as we intend to tie info to log entries.
145147
MDC.clear();
146148
}
147149
}

0 commit comments

Comments
 (0)