logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Joshua.P.Willi...@alltel.com>
Subject RE: How to set different levels per appender
Date Mon, 26 Jun 2006 21:12:03 GMT
This didn't seem to work... It generates a warning

WARN - No such property [threshold] in org.apache.log4j.RollingFileAppender.

-----Original Message-----
From: dirk ooms [mailto:dirk@onesparrow.com]
Sent: Monday, June 26, 2006 2:27 PM
To: Log4J Users List
Subject: Re: How to set different levels per appender


you can specify a threshold per appender, e.g.:

log4j.appender.logfile.Threshold=DEBUG

On Monday 26 June 2006 20:47, Joshua.P.Williams@alltel.com wrote:
> I have multiple appenders, and I would like for one (of this to have a
> detailed log level (trace), and the other to just have a log level for
> warnings and up. I would like for the "logfile" and "xml" appenders to have
> the detailed results, and I would like for the "html" appender to just have
> warnings and up.
>
> Here is my log4j.properties file.
>
> log4j.rootLogger=trace, stdout, logfile, html, xml
>
> # stdout
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.ConversionPattern=%d %p - %m%n
>
>
> # logfile
> log4j.appender.logfile=org.apache.log4j.RollingFileAppender
> log4j.appender.logfile.File=TGVAutomation.log
> log4j.appender.logfile.MaxFileSize=1024KB
> log4j.appender.logfile.MaxBackupIndex=5
> log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
> log4j.appender.logfile.layout.ConversionPattern=%d %p - %m%n
> #log4j.appender.logfile.layout.ConversionPattern=%d %r [%t] %-5p %c %x -
> %m%n
>
>
> # HTML appender properties
> log4j.appender.html=INFO
> log4j.appender.html=org.apache.log4j.RollingFileAppender
> log4j.appender.html.File=TGVAutomation.html
> log4j.appender.html.layout=org.apache.log4j.HTMLLayout
> log4j.appender.html.layout.ConversionPattern=%d%p%m
>
>
> # XML File appender properties.
> log4j.appender.xml=org.apache.log4j.RollingFileAppender
> log4j.appender.xml.File=TGVAutomation.xml
> log4j.appender.xml.MaxFileSize=1024KB
> log4j.appender.xml.MaxBackupIndex=5
> log4j.appender.xml.layout=org.apache.log4j.xml.XMLLayout
>
>
>
> ***************************************************************************
>*************** The information contained in this message, including
> attachments, may contain privileged or confidential information that is
> intended to be delivered only to the person identified above. If you are
> not the intended recipient, or the person responsible for delivering this
> message to the intended recipient, ALLTEL requests that you immediately
> notify the sender and asks that you do not read the message or its
> attachments, and that you delete them without copying or sending them to
> anyone else.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org

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


******************************************************************************************
The information contained in this message, including attachments, may contain 
privileged or confidential information that is intended to be delivered only to the 
person identified above. If you are not the intended recipient, or the person 
responsible for delivering this message to the intended recipient, ALLTEL requests 
that you immediately notify the sender and asks that you do not read the message or its 
attachments, and that you delete them without copying or sending them to anyone else. 



---------------------------------------------------------------------
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