logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Thielen" <da...@windward.net>
Subject Duplicate log entries - 1 last issue
Date Thu, 22 Sep 2005 22:35:52 GMT
Hi;

 

My log file is below. I switched to the xml format and here is the problem I
am having.

 

If I have:

      <logger name=3D"org.apache" additivity=3D"false">

            <level value=3D"info"/>

            <appender-ref ref=3D"stdout" />

      </logger>

Then nothing is written to the tomcat appender.

 

If I have:

      <logger name=3D"org.apache">

            <level value=3D"info"/>

            <appender-ref ref=3D"stdout" />

      </logger>

Then I get two problems:

First, tomcat now has INFO logging (want that in stdout only). Second,
stdout gets each entry twice.

 

??? - thanks - dave

 

 

Log4j.xml:

<?xml version=3D"1.0" encoding=3D"UTF-8" ?> <!DOCTYPE log4j:configuration
SYSTEM "log4j.dtd"> <log4j:configuration
xmlns:log4j=3D"http://jakarta.apache.org/log4j/">

 

      <appender name=3D"stdout"

class=3D"org.apache.log4j.ConsoleAppender">

            <layout class=3D"org.apache.log4j.PatternLayout">

                  <param name=3D"ConversionPattern" value=3D"%5p [%t] %m -
%c %M%n"/>

            </layout>

      </appender>

 

      <appender name=3D"tomcat"

class=3D"org.apache.log4j.RollingFileAppender">

            <param name=3D"file"

value=3D"${catalina.home}/logs/tomcat.log"/>

            <param name=3D"MaxFileSize" value=3D"100KB"/>

            <param name=3D"MaxBackupIndex" value=3D"10"/>

            <layout class=3D"org.apache.log4j.PatternLayout">

                  <param name=3D"ConversionPattern"

value=3D"%d{HH:mm:ss.SSS} %5p [%t] %c - %m%n"/>

            </layout>

      </appender>

 

      <appender name=3D"windward"

class=3D"org.apache.log4j.RollingFileAppender">

            <param name=3D"file"

value=3D"${catalina.home}/logs/windward.log"/>

            <param name=3D"MaxFileSize" value=3D"100KB"/>

            <param name=3D"MaxBackupIndex" value=3D"10"/>

            <layout class=3D"org.apache.log4j.PatternLayout">

                  <param name=3D"ConversionPattern"

value=3D"%d{HH:mm:ss.SSS} %5p [%t] %c - %m%n"/>

            </layout>

      </appender>

 

      <logger name=3D"net.windward" additivity=3D"false">

            <level value=3D"info"/>

            <appender-ref ref=3D"windward" />

      </logger>

      <logger name=3D"org.apache">

            <level value=3D"info"/>

            <appender-ref ref=3D"stdout" />

      </logger>

      <root>

            <priority value=3D"warn" />

            <appender-ref ref=3D"stdout" />

            <appender-ref ref=3D"tomcat" />

      </root>

 

</log4j:configuration>

 

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message