logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: How to log a particular priority of a Category in a separate Appender -Urgent
Date Fri, 15 Feb 2002 14:05:13 GMT

Start with the following first:

log4j.category.com.mizuho.rdw.processes=jms


At 15:47 15.02.2002 +0530, you wrote:
>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
>
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>

--
Ceki Gülcü



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


Mime
View raw message