logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Claassen" <mclaas...@ocie.net>
Subject Tomcat 6
Date Tue, 12 Jun 2007 19:43:58 GMT
Ok, I know this question has been asked a million times, but it depending
where I look I get different answers.

I want to mimic the logs that tomcat naturally does, but using log4j.  I
would also like to setup the logs for the webapps I know are going to be
there in a common place.  Can I do this?

log4j.rootLogger=info, ROOT 
log4j.appender.ROOT=org.apache.log4j.RollingFileAppender 
log4j.appender.ROOT.File=${catalina.base}/logs/tomcat.log 
log4j.appender.ROOT.MaxFileSize=1MB 
log4j.appender.ROOT.MaxBackupIndex=2 
log4j.appender.ROOT.layout=org.apache.log4j.PatternLayout 
log4j.appender.ROOT.layout.ConversionPattern=%p %t %c - %m%n 

log4j.logger.org.apache.catalina=DEBUG, CATALINA
log4j.appender.CATALINA=org.apache.log4j.RollingFileAppender 
log4j.appender.CATALINA.File=${catalina.base}/logs/catalina.log 
log4j.appender.CATALINA.MaxFileSize=1MB 
log4j.appender.CATALINA.MaxBackupIndex=2 
log4j.appender.CATALINA.layout=org.apache.log4j.PatternLayout 
log4j.appender.CATALINA.layout.ConversionPattern=%p %t %c - %m%n 

log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=D
EBUG, LOCALHOST
log4j.appender.LOCALHOST=org.apache.log4j.RollingFileAppender 
log4j.appender.LOCALHOST.File=${catalina.base}/logs/localhost.log 
log4j.appender.LOCALHOST.MaxFileSize=1MB 
log4j.appender.LOCALHOST.MaxBackupIndex=2 
log4j.appender.LOCALHOST.layout=org.apache.log4j.PatternLayout 
log4j.appender.LOCALHOST.layout.ConversionPattern=%p %t %c - %m%n 

log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[
/manager]=DEBUG, MANAGER
log4j.appender.MANAGER=org.apache.log4j.RollingFileAppender 
log4j.appender.MANAGER.File=${catalina.base}/logs/manager.log 
log4j.appender.MANAGER.MaxFileSize=1MB 
log4j.appender.MANAGER.MaxBackupIndex=2 
log4j.appender.MANAGER.layout=org.apache.log4j.PatternLayout 
log4j.appender.MANAGER.layout.ConversionPattern=%p %t %c - %m%n 


 


---------------------------------------------------------------------
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