This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
void testMDC() { | |
Logger log = LoggerFactory.getLogger("test"); | |
Hooks.enableAutomaticContextPropagation(); | |
// To deal with the entire MDC (if we ensured no third-party code modifies it): | |
// ContextRegistry.getInstance().registerThreadLocalAccessor(new MdcAccessor()); | |
// To deal with an individual key in the MDC: |