[slf4j-dev] MDC Type functionality

John E. Conlon jconlon at verticon.com
Mon Mar 26 18:55:17 CEST 2007


Hello Paul,

Have you considered using the


    org.slf4j.Marker

to move this data to the readers? See the FAQ 
http://www.slf4j.org/faq.html#marker_interface

BTW - You may have noticed in our slf4j source repository we have 
implemented a simple osgi log service for slf4j?
http://svn.slf4j.org/viewvc/slf4j/trunk/osgi-over-slf4j/

I have not worked with the Equinox log service but plan to do so soon. 
Paul would you be so kind to please provide a link to the documentation 
that can describe the Equinox extensions? Is this log service the same 
used by Eclipse as well?

thanks,
John


Gardiner, Paul wrote:
>
> 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
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> dev mailing list
> dev at slf4j.org
> http://www.slf4j.org/mailman/listinfo/dev




More information about the slf4j-dev mailing list