Re: log4j, tomcat and multiple webapps
- From: Raymond DeCampo <nospam@xxxxxxxxxxxx>
- Date: Sat, 08 Oct 2005 02:00:28 GMT
PeterH wrote:
Hi all,
I have a number of different webapps deployed which are all logging to the same log file, depending on which one is started first and how the server is feeling at the time.
The log4j.properties files start with a line of the format:
log4j.logger.<package>.<class>=DEBUG, R
In the matching classfile in the webapp, the logger is declared as:
private static Log log = LogFactory.getLog(<class>.class);
Where am I going wrong?
The typical thing to do with log4j in a web container is to supply each web application with its own log4j.jar. The class loading rules for web applications imply that each web application will get its own version of the log4j classes, and so then will not share the static configuration information.
HTH, Ray
-- XML is the programmer's duct tape. .
- Follow-Ups:
- Re: log4j, tomcat and multiple webapps
- From: Juha Laiho
- Re: log4j, tomcat and multiple webapps
- Prev by Date: Re: Sun's javac doesn't grok generics?
- Next by Date: Re: [J2EE] Legal to access the HttpServletRequest concurrently ?
- Previous by thread: Binomial Simulation
- Next by thread: Re: log4j, tomcat and multiple webapps
- Index(es):
Relevant Pages
|