logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pitre, Russell" <RPI...@shawmut.com>
Subject Exclude a class from a particular appender.....
Date Tue, 06 Jan 2004 16:50:16 GMT
Hello All-


I'm using Jboss 3.2 and I'm trying to figure out how to exclude a
certain class from the console appender.  I have two appender's; a
console appender for ALL my classes and another appender for a specific
package of classes.  This package provides scheduling capabilities from
my app and writes to the console every 10 seconds.  I would like to have
this package log to a RollingFileAppender ONLY and not to the console
appender every 10 seconds.  Does anyone know how to EXCLUDE a class from
being logged on a certain appender such as the CONSOLE appender seen
below?  Any help is greatly appreciated.



  <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">

    <param name="Target" value="System.out"/>

            <!-- CHANGE "Value" to debug, info, warn, etc...-->

    <param name="Threshold" value="info"/>


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

      <!-- The default pattern: Date Priority [Category] Message\n -->

      <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}]







              <appender name="UserDefined"

                        <param name="File"

                        <param name="Append" value="false"/>

                        <param name="MaxFileSize" value="500KB"/>

                        <param name="MaxBackupIndex" value="1"/>


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

                          <param name="ConversionPattern" value="%d %-5p
[%c] %m%n"/>



                        <category name="com.shawmut.portal.scheduler">

                                    <priority value="info"/>

                                    <appender-ref ref="UserDefined"/>







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