In my organization we use a mechanism very similar to that shown in http://www.slf4j.org/extensions.html#event_logger. SLF4J doesn't provide standard key names or methods for common fields, but you can easily create a wrapper of the MDC to do this. We have a class called RequestContext that does exactly that. All our applications use that class to access the data in the MDC.

Ralph

On Aug 18, 2009, at 3:27 AM, haukex wrote:


Hi all,

I am trying to figure out how a logging server can easily output some kind
of information about which client sent the logging message.

Log4j's SocketAppender has an "application" property that can be set that
causes the application name to be written to the MDC, so that on the server
that information is logged.

I am looking for an equivalent in Logback and would be greatful if anyone
could help out!

Thanks,
-- Hauke D

--
View this message in context: http://www.nabble.com/SocketAppender-application-property-tp25009895p25009895.html
Sent from the Logback User mailing list archive at Nabble.com.

_______________________________________________
Logback-user mailing list
Logback-user@qos.ch
http://qos.ch/mailman/listinfo/logback-user