Raman Gupta created LOG4J2-2433:
-----------------------------------
Summary: Support MDCs with Kotlin coroutines
Key: LOG4J2-2433
URL: https://issues.apache.org/jira/browse/LOG4J2-2433
Project: Log4j 2
Issue Type: New Feature
Components: Kotlin API
Affects Versions: Kotlin 1.0.0
Reporter: Raman Gupta
Create support for log4j2 MDC when used with Kotlin coroutines. Since
coroutines do not guarantee which underlying thread is executing code after a
continuation, a standard ThreadLocal is not sufficient to keep the MDC context.
Kotlin coroutines have a mechanism by which "coroutine local" data can be
stored. See the reference implementation for SLF4J here:
https://github.com/Kotlin/kotlinx.coroutines/tree/master/integration/kotlinx-coroutines-slf4j
We should implement an optional module to add support for log4j2 MDC using the
same pattern.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)