tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Tomcat log files
Date Tue, 09 Nov 2010 21:35:38 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Timothy,

On 11/9/2010 4:06 PM, Christopher Schultz wrote:
> I'm not sure why the documentation doesn't show an equivalent
> configuration for log4j. Maybe I'll write one and submit it for inclusion.

Without testing it, I've written this log4j configuration which should
be equivalent to the default one that ships with Tomcat. I apologize in
advance for any line-wrapping problems which may arise from my emailer.

log4j.rootLogger=DEBUG, CATALINA

# Define all the appenders
log4j.appender.CATALINA=org.apache.log4j.DailyRollingFileAppender
log4j.appender.CATALINA.file=${catalina.base}/logs/catalina.
log4j.appender.CATALINA.encoding=UTF-8
# Roll-over the log once per day
log4j.appender.CATALINA.DatePattern='.'yyyy-MM-dd'.log'
log4j.appender.CATALINA.conversionPattern = %d [%t] %-5p %c- %m%n
log4j.appender.CATALINA.append=true

log4j.appender.LOCALHOST=org.apache.log4j.DailyRollingFileAppender
log4j.appender.LOCALHOST.file=${catalina.base}/logs/localhost.
log4j.appender.LOCALHOST.encoding=UTF-8
log4j.appender.LOCALHOST.DatePattern='.'yyyy-MM-dd'.log'
log4j.appender.LOCALHOST.conversionPattern = %d [%t] %-5p %c- %m%n
log4j.appender.LOCALHOST.append=true

log4j.appender.MANAGER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.MANAGER.file=${catalina.base}/logs/manager.
log4j.appender.MANAGER.encoding=UTF-8
log4j.appender.MANAGER.DatePattern='.'yyyy-MM-dd'.log'
log4j.appender.MANAGER.conversionPattern = %d [%t] %-5p %c- %m%n
log4j.appender.MANAGER.append=true

log4j.appender.HOST-MANAGER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.HOST-MANAGER.file=${catalina.base}/logs/host-manager.
log4j.appender.HOST-MANAGER.encoding=UTF-8
log4j.appender.HOST-MANAGER.DatePattern='.'yyyy-MM-dd'.log'
log4j.appender.HOST-MANAGER.conversionPattern = %d [%t] %-5p %c- %m%n
log4j.appender.HOST-MANAGER.append=true

log4j.appender.CONSOLE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.CONSOLE.file=${catalina.base}/logs/.
log4j.appender.CONSOLE.encoding=UTF-8
log4j.appender.CONSOLE.DatePattern='.'yyyy-MM-dd'.log'
log4j.appender.CONSOLE.conversionPattern = %d [%t] %-5p %c- %m%n
log4j.appender.CONSOLE.append=true

# Configure which loggers log to which appenders
log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=INFO,
LOCALHOST
log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager]=INFO,
MANAGER
log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager]=INFO,
HOST-MANAGER
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzZvqoACgkQ9CaO5/Lv0PBweACcC8nkWamXXjXCRgGjoHUtVpBY
iBYAoInaalGQ+H+Zbcmg/QIxfFrTGa47
=/vyy
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message