[logback-user] (no subject)
Ralph Goers
rgoers at apache.org
Wed Jul 10 00:31:48 CEST 2013
This will modify the MDC, not just the properties in the logging event, which seems to be what was requested.
Ralph
On Jul 9, 2013, at 7:55 AM, Felipe wrote:
> That should be easy. Juast add import correct classes and then do at proper section (posiblt the init of the thread) MDC.put(key, value).
>
>
> On Tue, Jul 9, 2013 at 10:35 AM, KwonNam Son <kwon37xi at gmail.com> wrote:
> Hello,
>
> When I use Log4j, I can add MDC properties to LogginEvent by using RewriteAppender. It's possible because log4j's LoggingEvent is not an interface and it has setProperty() method.
>
> Is it possible to add or modify MDC properties dynamically in Logback?
>
> The reason I need to change MDC properties using appenders is because of some logs from unaccessible threads. I want to add hostname, application name and some of server's infomation to the logs then transfer the logs event to the central log receiver.
>
>
>
> Thanks.
>
>
>
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user
>
>
>
> --
> Felipe
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20130709/54eb50c9/attachment.html>
More information about the Logback-user
mailing list