Agreed.
I would qualify your statement with the words: "XML configuration files"
I hope I'm not being too bold when I say properties files as configuration
mechanisms are a way of the past!

-----Original Message-----
From: Mark Womack [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 04, 2002 2:17 PM
To: 'Log4J Users List'
Subject: RE: simple question not found in mail archives


If you have an older version, you can use <category> instead of <logger>.

Glad to help, but it concerns me that you could not find this simple answer
on the log4j web site.  All the more reason for a easy to search faq, with
an emhpasis on configuration files, IMO.

-Mark

> -----Original Message-----
> From: Jung, Eric (Contractor) [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 04, 2002 11:14 AM
> To: 'Log4J Users List'
> Subject: RE: simple question not found in mail archives
> 
> 
> Hi Mark,
> That is EXACTLY what I want to do! And it works, too! Now if 
> only my log4j
> DTD permitted <logger/> elements under 
> <log4j:configuration/>. I must have
> an outdated version.
> 
> Thank you SO much for the help!
> 
> -Eric
> p.s. I wish it were clear how to map log4j property files to 
> XML. The DTD
> helps somewhat, but not entirely.
> 
> 
> -----Original Message-----
> From: Mark Womack [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 04, 2002 2:03 PM
> To: 'Log4J Users List'
> Subject: RE: simple question not found in mail archives
> 
> 
> Eric,
> 
> Can't you do the following:
> 
> <logger name="com.mycompany.somepackage.SomeClass">
>   <priority value="error"/>
> </logger>
> 
> That example is for a particular class.  If you wanted to 
> affect the entire
> package, it would be like this:
> 
> <logger name="com.mycompany.somepackage">
>   <priority value="error"/>
> </logger>
> 
> Is that what you are looking for?
> 
> -Mark
> 
> > -----Original Message-----
> > From: Jung, Eric (Contractor) [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, October 04, 2002 9:52 AM
> > To: 'Log4J Users List'
> > Subject: RE: simple question not found in mail archives
> > 
> > 
> > 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]>
> > 
> 
> --
> 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]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to