[logback-user] Any way to turn off MDC inheritance?
Paul Krause
pkrause at investsoftech.com
Mon Aug 31 23:34:27 CEST 2015
If you know what information you want to keep and what you want to discard, then you should be able use MDC.getCopyOfContextMap() and MDC.setContextMapValues() to clean up the MDC. But you'll need to figure out when to call them based on the API that the thread-pool exposes to you.
From: Logback-user [mailto:logback-user-bounces at qos.ch] On Behalf Of White, Joshua A A6IT
Sent: Monday, August 31, 2015 5:21 PM
To: logback-user at qos.ch
Subject: [logback-user] Any way to turn off MDC inheritance?
Hello,
I am using logback version 1.1.3. I have a situation where the MDC is getting copied over to thread pools that I don't manage and filling my logs with log statements that contain MDC information that is no longer valid. Because I don't manage these thread pools, I am not able to copy the correct values to that thread pool when threads get used/re-used).
Does anyone have a solution for this problem?
-Joshua
------------------------------------------------------------------------------
CONFIDENTIALITY NOTICE: If you have received this email in error,
please immediately notify the sender by e-mail at the address shown.
This email transmission may contain confidential information. This
information is intended only for the use of the individual(s) or entity to
whom it is intended even if addressed incorrectly. Please delete it from
your files if you are not the intended recipient. Thank you for your
compliance. Copyright (c) 2015 Cigna
==============================================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20150831/768239f5/attachment.html>
More information about the Logback-user
mailing list