[slf4j-dev] MDC Type functionality
Gardiner, Paul
PGardiner at syntellect.com
Mon Mar 26 15:40:00 CEST 2007
I have written an SLF4J binding to the Equinox extended log service,
which is an extension of the OSGi logging service, that includes
contextual information, and passes "isLoggable" statements through to
log listeners (readers). The problem I have is supporting extra data
that is not part of the log message. SLF4J does not include MDC or NDC
functionality, so I am not sure of the best way to pass through this
kind of data. A typical use case is session id, which is passed as MDC.
When the log entry is made, the session id is included in the file
appender, but omitted from an appender that sends pages. One solution
is to read all MDC data and pass it through to the OSGi log service, and
then recreate it in the log reader. However, I was wondering if there
was a more elegant/less expensive solution.
Thanks,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/slf4j-dev/attachments/20070326/3aa30d49/attachment.htm>
More information about the slf4j-dev
mailing list