There wasn't any response on this.
This is causing a packaging problem since appenders of the different processes
are in different
packages/jars. I have to have alerts.jar in my classpath to run the status
process since the alerts appender
(in alerts.jar) is initialised when log4j is initialised while running the
status application.
Other than having multiple log4j properties files, is there a solution to this?
On Thu, 08 Apr 2004 14:20:36 +0550, Milind Rao wrote:
I have a couple of processes, both of which log using their own loggers to their
own log files. I wanted to
keep
one logger properties file for both the processes, but I'm running into a
problem.
When each process starts up, both loggers are initialised. Is it possible for
the loggers to get initialised
only
on the first log event?
My logger.properties looks as under
log4j.rootLogger=DEBUG, A1, A2
log4j.logger.AlertLogger=DEBUG, A1, A4
log4j.additivity.AlertLogger=false
log4j.logger.StatusLogger=DEBUG, A1, A5
log4j.additivity.StatusLogger=false
I'd like the AlertLogger appender (A4) and the StatusLogger Appender (A5) to
only get initialised when the
first
alert/status log message is logged.
Regards
Milind