logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eddie Post" <post2me...@hotmail.com>
Subject separate log files ??
Date Mon, 03 Sep 2001 12:28:53 GMT
I already posted about the same question two weeks ago, hope to get some
advice this time.

The problem I am having is the following:
- I am using a J2EE application server, called Orion to run my application
and use log4j to log.
This works fine, except that is very hard to tell Orion which log4j-core.jar
and log4j.jar it has to use.
That is: I included in every J2EE application a log4j-core and log4j.jar,
just like the spec tell.

However, when application A logs in log file log_file_A and it connects to
applicatoin B, it continues logging in log_file_B. This comes because
application B initializes log4j with PropertyConfigurator.configure(config
file) and appearantly it overrides the log4j properties of application A.

I am now looking how I should overcome this and was thinking about the
- explictely tell the classloader which jar file it should use. I have no
idea yet how to do that. I don't even think this is a good solution as I
loading class files in my Application A and I want that the loaded calsses
have their own log file.
- simple use one log4j config file and add a appender for every log file.
However I don't know how to assign a appender to a category ??. I was
thinking about something like:
log4j.category.nl.unwired.sgs.web=DEBUG, FILE
, where FILE is an appender, but this doesn't work. This would be a very
flexible-good solution for me.. too bad... Hmmmm

Please some help on the following:
- How have others solved this problem ?
- Where can I find the correct syntax of the properties that can be set in
the log4j property file ? and what are all those properties ?


Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

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

View raw message