Hi Sara,
Thanks for the suggestion. I have tried that, too, but my results are that
_all_ packages and classes connected to the "email" appender are then set to
level ERROR.
I use this code after your "email" appender:
<root>
<priority value="ERROR"/>
<appender-ref ref="email"/>
</root>
What I'm looking to do is set particular packages or classes to the ERROR
level, not all packages and classes.
Any other ideas?
Thank you,
Eric H. Jung
-----Original Message-----
From: Sara Prigge [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 04, 2002 12:45 PM
To: 'Log4J Users List'
Subject: RE: simple question not found in mail archives
Eric-
I'm not sure if this is what you're looking for, but I use:
<param name="Threshold" value="<put level here>"/>
to set the threshold level of a class in my XML config file.
This is the context I use it in:
<appender name="email" class="org.apache.log4j.net.SMTPAppender">
<param name="Threshold" value="ERROR"/>
<param name="SMTPHost" value="xxx.xx.xx.xx"/>
<param name="To" value="[EMAIL PROTECTED]"/>
<param name="From" value="[EMAIL PROTECTED]"/>
<param name="Subject" value="Subject Here"/>
<param name="BufferSize" value="1"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ABSOLUTE}
(%F:%L) - %m%n"/>
</layout>
</appender>
Hope this helps!
Sara Prigge
Web Developer
Long Term Care Group, Inc.
http://www.ltcg.com
-----Original Message-----
From: Jung, Eric (Contractor) [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 04, 2002 11:36 AM
To: '[EMAIL PROTECTED]'
Subject: simple question not found in mail archives
Hi,
I've been using log4j for almost year now, but have never been able to find
an answer to this simple question:
How can I set the threshold for a particular package or class in an XML
log4j config file?
I know how to do this in a properties file:
log4j.logger.org.apache.commons.digester=ERROR, A2
but I don't know the XML equivalent.
All I really want to do is turn off all WARN and below output from the
rather verbose Commons Digester!
TYIA,
Eric H. Jung
Contract Consultant
Russell/Mellon Analytical Services
1-617-382-1373
Everett, MA, USA
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>