[logback-user] [EXTERNAL] Custom MDC Implementations?
Scott,Tim
Tim.Scott at oclc.org
Wed Apr 17 12:32:40 UTC 2024
From: logback-user <logback-user-bounces at qos.ch> On Behalf Of Paul Galbraith via logback-user
Sent: Tuesday, April 16, 2024 2:59 PM
To: logback-user at qos.ch
Cc: Paul Galbraith <paul at galbraiths.ca>
Subject: [EXTERNAL] [logback-user] Custom MDC Implementations?
Is it possible to write your own custom MDC implementation (similar to
log4j's ContextDataProvider) so that logback can get context details
from something other than threadlocal storage?
---
Hi,
I believe this is something I have done. One thing to note was to ensure that the MDC data is cleared as soon as it's irrelevant, especially in an application whereby user activity from a different application session might re-use that thread.
This includes any exception handling that might report "something went wrong" to the use, or similar.
What is it you are trying (not) to do?
Thanks,
Tim
--
Tim Scott (he/him/his)
OCLC * Lead Software Engineer
cc: IT file
More information about the logback-user
mailing list