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 [email protected] http://www.slf4j.org/mailman/listinfo/dev
