logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "B Manikandan" <manikandan.balasubraman...@wipro.com>
Subject How to log a particular priority of a Category in a separate Appender -Urgent
Date Fri, 15 Feb 2002 10:17:33 GMT
Hi,
    I have my rootCategory as DEBUG.But for some Categories,certain
priorities alone need to be logged to a separate Appender.My property
file is....

          log4j.rootCategory=DEBUG,fileLog
          log4j.debug=true

     #----------------------------------------------------------------------------

     # fileLog configuration
     # fileLog appender is set to be a DailyRollingFileAppender.
     # the log file will be rolled over every month
     # Truncate log file if it aleady exists.
     #----------------------------------------------------------------------------

     log4j.appender.fileLog=org.apache.log4j.DailyRollingFileAppender

     log4j.appender.fileLog.File=/usr/log/rdw_debug.log
     log4j.appender.fileLog.DatePattern='.'yyyy-MM
     log4j.appender.fileLog.Append=false
     log4j.appender.fileLog.layout=org.apache.log4j.PatternLayout
     log4j.appender.fileLog.layout.ConversionPattern=%d{DATE} : %c
     : %-5p : %m%n
     #----------------------------------------------------------------------------

     # Statistics Logging configuration.
     #----------------------------------------------------------------------------

     # Set the priority of the category named
     "com.mizuho.rdw.processes.*" to
     # LoggerPriority.STATISTICS, attach appender jms.
     #----------------------------------------------------------------------------

     log4j.category.com.mizuho.rdw.processes.*=STATISTICS,jms
     log4j.appender.jms=org.apache.log4j.net.JMSAppender

STATISTICS is my own priority.For categories com.mizuho.rdw.processes.*,
I want to log STATISTICS priority alone in JMS.All other priorities of
the same categories have to go to a file as defined for rootCategory.How
do I achieve this.

Mani




Mime
View raw message