[logback-user] SocketAppender application property

haukex hauke at zero-g.net
Tue Aug 18 18:25:27 CEST 2009


Hi Ralph,

Thanks for the information, I was also thinking about writing some custom
code to insert the value in the MDC myself, but I was hoping this might be
supported out-of-the-box :) Since the value really is application-wide, it
makes more sense to me as something to be configured in logback.xml... I was
thinking of writing a custom filter that does nothing but set this value in
the MDC, but that seems a little wasteful.

Regards,
-- Hauke D


rgoers wrote:
> 
> 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
> 

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



More information about the Logback-user mailing list