You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by James Stauffer <js...@spscommerce.com> on 2004/06/24 20:55:05 UTC

Database logging: server name

Since we have 16 servers running one product we would like the logs to
include the server name.  Is there a way to make that happen automatically?
I was using an MDC value but I found that it wasn't always being set.  It
appears that since the servlet engine created multiple threads before my
static code ran to set the MDC it was only set on one thread.  I don't want
to set it on every request because it never changes.  Ideas?