diff --git a/logging/common/pom.xml b/logging/common/pom.xml
index e183cc106b6..6cbb40566f7 100644
--- a/logging/common/pom.xml
+++ b/logging/common/pom.xml
@@ -32,5 +32,9 @@
io.helidon.common
helidon-common
+
+ io.helidon.common
+ helidon-common-context
+
diff --git a/logging/common/src/main/java/io/helidon/logging/common/HelidonMdc.java b/logging/common/src/main/java/io/helidon/logging/common/HelidonMdc.java
index c0a56a4f30e..38a539f4213 100644
--- a/logging/common/src/main/java/io/helidon/logging/common/HelidonMdc.java
+++ b/logging/common/src/main/java/io/helidon/logging/common/HelidonMdc.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, 2022 Oracle and/or its affiliates.
+ * Copyright (c) 2020, 2025 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,22 +15,34 @@
*/
package io.helidon.logging.common;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.ServiceLoader;
+import java.util.function.Supplier;
import io.helidon.common.HelidonServiceLoader;
import io.helidon.logging.common.spi.MdcProvider;
/**
* Helidon MDC delegates values across all of the supported logging frameworks on the classpath.
+ *
+ * Helidon permits adding MDC entries using {@code Supplier} values as well as direct {@code String} values.
+ * Although some logging implementations provide their own context maps (for example {@code ThreadContext} in Log4J and
+ * {@code MDC} in SLF4J), they map MDC keys to {@code String} values, not to arbitrary objects that would accommodate
+ * {@code Supplier}. Therefore, Helidon not only propagates every {@code set} operation to the loaded MDC providers,
+ * but also manages its own map of key/supplier pairs. Helidon resolves each lookup using that map
+ * if possible, delegating a look-up to the loaded MDC providers only if there is no supplier for a key.
*/
public class HelidonMdc {
private static final List MDC_PROVIDERS = HelidonServiceLoader
.builder(ServiceLoader.load(MdcProvider.class)).build().asList();
+ private static final ThreadLocal