logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Bailey" <ch...@codeintensity.com>
Subject Questions re multiple configurations, multiple log files
Date Thu, 17 Oct 2002 18:16:19 GMT
I have an application, or rather, set of applications that use log4j
extensively for logging.  In general, there is a "service" wrapper on each
application, and then the app.  What I wanted was for the service to have a
log4j config file and do it's logging based on that, and then the
application to have a log4j config file of its own and write to the files
specified by that.  But, it appears that when the application does it's
log4j configuration, that supersedes the service's log4j config, so now the
service is writing all its messages to the app's log files.  Is that
correct - is there only one config of log4j per VM instance?  I believe this
is true because they use the same classloader and thus the same static log4j
instances, etc.

I am already using NDC's within the application.  Is it possible to achieve
what I want, in a single VM/classloader, or do I basically have to use a
single config file and then separate out my logging messages based on NDC
and/or Logger name, etc.?

Also, we have multiple instances of this kind of thing, not of the app's
themselves, but of the service component (which is a generic wrapper that is
used across each app).  Each one runs in a separate VM, but they write to
the same log file.  Is that a problem?

It seems that I may have to rethink this and use a single config file as
well as single log file (of a given type, e.g. text file), and then just
differentiate the log messages within that log file.

__
Chris Bailey       mailto:chris@codeintensity.com
Code Intensity     http://www.codeintensity.com


--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


Mime
View raw message