From f1fc5a14a8b6e0eed388b2bf8da09f8de1b732ca Mon Sep 17 00:00:00 2001 From: Ceki Gulcu Date: Tue, 23 Jan 2024 15:51:31 +0100 Subject: [PATCH] more comments Signed-off-by: Ceki Gulcu --- slf4j-api/src/main/java/org/slf4j/MDC.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/slf4j-api/src/main/java/org/slf4j/MDC.java b/slf4j-api/src/main/java/org/slf4j/MDC.java index 6ba316453..6b0feded0 100644 --- a/slf4j-api/src/main/java/org/slf4j/MDC.java +++ b/slf4j-api/src/main/java/org/slf4j/MDC.java @@ -91,6 +91,9 @@ private MDC() { static { SLF4JServiceProvider provider = LoggerFactory.getProvider(); if (provider != null) { + // obtain and attach the MDCAdapter from the provider + // If you wish to change the adapter, Setting the MDC.mdcAdapter variable might not be enough as + // the provider might perform additional assignments that you would need to replicate/adapt. mdcAdapter = provider.getMDCAdapter(); } else { Reporter.error("Failed to find provider.");