logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rakesh Patel <rpa...@us.nomura.com>
Subject Log4j Appenders/Category Usage
Date Thu, 06 Oct 2005 17:08:16 GMT
I have the following log4j.xml file. I've included the salient portions. here 
is what i see:

1. i see the logs from logger com.company.a.b.c.f in msglog.log via the 
message_appender (info level and above).

2. i see the logs from logger com.company.a.b.d.f in msglog.log via the 
message_appender (info level and above).

question is : why do i see the logs of message_appender (what is in msglog.log) 
in syslog.log which should only be seeing WARN level messages????? i'd like to 
understand why i am seeing this type of behavior and what is the correct way to 
log what i want which is: system_appender should only log warn message and 
above from all logger com.company and down.

thanks

rakesh

----

<appender name="message_appender" class="org.apache.log4j.FileAppender">
 <param name="File"  value="msglog.log"/>
   <layout class="org.apache.log4j.PatternLayout">
 <param name="ConversionPattern" value="[%d{yyyyMMdd HH:mm:ss}] %m%n"/>
   </layout>
</appender>

<appender name="system_appender" class="org.apache.log4j.FileAppender">
 <param name="File"  value="syslog.log"/>
   <layout class="org.apache.log4j.PatternLayout">
 <param name="ConversionPattern" value="[%d{yyyyMMdd HH:mm:ss}] %m%n"/>
   </layout>
</appender>

<category name="com.company.a.b.c.f">
   <priority value="info"/>
     <appender-ref ref="message_appender"/>
</category>

<category name="com.company.a.b.d.f">
   <priority value="info"/>
      <appender-ref ref="message_appender"/>
</category>

<category name="com.company">
   <priority value="warn"/>
      <appender-ref ref="system_appender"/>
</category>



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


Mime
View raw message