[logback-user] Hostname or process ID in log messages

Daniel Ferber dffforum at gmail.com
Fri Dec 28 17:15:09 CET 2012


Hi,

I am wondering if Logback has a solution to identify the process or the
host that is running the application.
This would be relevant for applications with instances running in parallel,
but writing their log to a central repository (eg using DBAppender to a
common database).
A typical scenario would be load balancing a web application in the cloud,
or a heavy computation split over several processors.
If an instance fails, I would be important to have the log message to
distinguish this instance among others.
I think that MDC could do this job. However, this would work only for
threads that are under my control.
Is it possible to add some log meta-data globally to the logger context?

Best regards,
Daniel Felix Ferber
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20121228/870e602e/attachment.html>


More information about the Logback-user mailing list