tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amir Fadaghi" <>
Subject Re: rotating catalina.out using log4j
Date Tue, 12 Feb 2008 20:06:20 GMT
Thank you very much for your help with log4j 

>>> David Delbecq <> 2/12/2008 2:53:40 AM >>>
catalina.out is just the sink for System.out and System.err, it's not 
managed by logging facilities. It's not even seen by jvm, as the 
redirection is done in the startup script (using the shell '>' 
redirector). If you configure a log4j logger for tomcat that uses an 
other file (see below our simple config) and teach all your webapps to

not use stdout and stderr, you shouldn't see anymore things appear in 
catalina.out. If you still need rolling of file during startup, you
need to ask external tools (like unix logrotate) to do it for you.

......common/classes# cat
log4j.rootLogger=INFO, R
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n

En l'instant précis du 11/02/08 17:39, Amir Fadaghi s'exprimait en ces

> Hi,
> I am trying to implement the catalina.out log rotation in the
development environment (for now and will implement to other
environments once I figure this out) using log4j.  I am running
apache-tomcat version 5.5.25 and downloaded the apache-log4j-1.2.15 and
commons-logging-1.1.1.  I copied the log4j.jar and commons-logging.jar
into the $CATALINA_HOME/lib and created the in the
common/classes.  However, when I stop and start the apache-tomcat the
cataline.out is not rotating.
>  Here is the my directory listings in the commons/lib direcotry and
commons/classes directory:
> /usr/local/apache-tomcat-5.5.25/common:
> ls lib
> commons-el.jar             jasper-runtime.jar        
> commons-logging-1.1.1.jar  jsp-api.jar               
> jasper-compiler-jdt.jar    log4j-1.2.15.jar          
> jasper-compiler.jar        naming-factory-dbcp.jar
> should I change the highlighted filenames to commons-logging.jar and,
> /usr/local/apache-tomcat-5.5.25/common:
> ls classes
> tail classes/
> #
> # Application logging options
> #
> is the above line uncommented correct for rotating catalina.out
> My environment is:
> Sun Solaris 10
> I thank you for any help you provide.
> -----------------------------------------
> Email messages cannot be guaranteed to be secure or error-free as
> transmitted information can be intercepted, corrupted, lost,
> destroyed, arrive late or incomplete, or contain viruses. The
> Centers for Medicare & Medicaid Services therefore does not accept
> liability for any error or omissions in the contents of this
> message, which arise as a result of email transmission.
> CONFIDENTIALITY NOTICE: This communication, including any
> attachments, may contain confidential information and is intended
> only for the individual or entity to which it is addressed. Any
> review, dissemination, or copying of this communication by anyone
> other than the intended recipient is strictly prohibited. If you
> are not the intended recipient, please contact the sender by reply
> email and delete and destroy all copies of the original message.
> To start a new topic, e-mail: 
> To unsubscribe, e-mail: 
> For additional commands, e-mail: 

-- (a belgian developer's logs)

To start a new topic, e-mail: users@ 
To unsubscribe, e-mail: 
For additional commands, e-mail: 

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message