logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul <rj...@yahoo.com>
Subject log4j logging on Tomcat: Basic Question
Date Mon, 06 Mar 2006 00:04:39 GMT
Hi,

I am trying to use log4j for my application which uses
Tomcat 5.5.8 and had two JSPs and frew class files. 

I instantiate logger as follows: 

//Exp is in package edu.uta.util
final static Logger log = Logger.getLogger(Exp.class);

My log4j.properties file is in common/classes folder
and has these entries: 

log4j.rootCategory=INFO, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=CBS %p:
%C{1}.%M(%L) | %m%n
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=C:/tomcat-5.5.8/logs/CBS.log
log4j.appender.R.MaxFileSize=100KB
log4j.appender.R.MaxBackupIndex=0
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%t %c - %m%n
log4j.logger.edu.uta.util=info
log4j.logger.org.apache.commons=ERROR

When I use log.info("*** log test"); I get the
properly formatted output in catalina.out but the file
CBS.log is not created. 

I've log4j.jar in C:/tomcat-5.5.8/shared/lib

Am I making a mistake somwhere?

Thanks,
Rahul.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Mime
View raw message