My companys web application uses log4j 1.2.8 for logging and have just recently 
switched from Weblogic to Tomcat 6.0.18.

Since the we switched to Tomcat, when we do some logging within a servlet
 
"
private static final Log log = LogFactory.getLog(ExceptionHandlerServlet.class);
log.error("some message, throwable);
"

The "some message" -line is written to the file specified by log4j, but why 
does the stacktrace gets written to Tomcats stdout.log?

This behaviour is for servlets only. For the other Java classes in the webapp, 
both the "some message" -line and the stacktrace is written to the file 
specified by log4j.


___________________________________________________

Extra info
The log -settings of Tomcat is the standard setup

This is our log4j.properties file

"
log4j.appender.A1=org.apache.log4j.RollingFileAppender
log4j.appender.A1.MaxBackupIndex=20
log4j.appender.A1.MaxFileSize=10MB

log4j.appender.A1.layout=org.apache.log4j.PatternLayout

log4j.appender.A1.layout.ConversionPattern=%d{ABSOLUTE} %-5p %X{ak} [%c{1}] %m%n
log4j.rootLogger=ERROR, A1

log4j.category.se=INFO

# All System.out.println is redirected to stdout logger, INFO level
log4j.category.stdout=INFO

# All System.err.println (includes Exception.printStackTrace() is redirected to 
stderr logger, INFO level
log4j.category.stderr=INFO
"

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

Reply via email to