logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: Appender logging to 2 logs - how to stop it
Date Fri, 07 Nov 2003 19:09:18 GMT

1.  You should use <logger>, not <category>
2.  If you don't want to inherit logging from the <root> logger, you should 
add additivity="false" to the UserTracker <logger>
3.  You might want to set the <level>'s you prefer as well

Jake

At 12:06 PM 11/7/2003 -0500, you wrote:
>Hello,
>
>I am using log4j 1.2.8 (under JBoss).  I'm having a problem with
>one of my Appenders logging to multiple log files, even though I
>didn't configure it to do this.
>
>Here is how I configured it:
>
><appender name="MyUserTracker"
>class="..DailyRollingFileAppender">
>   <param name="File" value="/....../tracker.log"/>
>   <param name="Threshold" value="INFO"/>
>   <param name="Append" value="true"/>
>   <param name="DatePattern" value="......"/>
>
>   <layout class="org.....">
>     <param name="ConversionPattern" value="...."/>
>   </layout>
></appender>
>
><category name="UserTracker">
>   <appender-ref ref="MyUserTracker"/>
></category>
>
>
>That is it.
>
>The log4j.xml also contains configs for several other appenders,
>and contains this:
>
><root>
>   <appender-ref ref="CONSOLE"/>
>   <appender-ref ref="FILE"/>
></root>
>
>CONSOLE is a ConsoleAppender catching System.out and FILE is a
>DailyRollingFileAppender going to a different log file.
>
>
>It seems to me like messages going to my UserTracker appender
>are somehow getting saved into the CONSOLE appender.
>Nothing in my code prints to System.out.
>
>I have not been able to figure this out for a looong time.
>Does anyone know how to prevent this from happening?
>
>Thanks,
>Otis
>
>
>________________________________________________
>Get your own "800" number
>Voicemail, fax, email, and a lot more
>http://www.ureach.com/reg/tag
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message