You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bill Comer <bi...@gmail.com> on 2005/12/23 13:45:50 UTC

log4j: making standard error go to tomcat logs

we have recently taken management of a web application that uses
log4j. I am used to using java.util.logging.Logger

I have setup the log4j.xml so that the logging messages go to the
standrad tomcat log file.

However stack traces still go to catalina.out.

How can I get them to go to the tomcat log ?

below is my log4j.xml

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration >

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

    <appender name="A1" class="org.apache.log4j.rolling.RollingFileAppender">
              class="org.apache.log4j.FileAppender">
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n"/>
        </layout>
        <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
            <!-- Set the path and file name pattern for your Tomcat
log files -->
            <param name="FileNamePattern"
value="/var/log/tomcat/wapgen-tomcat.%d.log"/>
        </rollingPolicy>
    </appender>


</log4j:configuration>

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