Wes,

First, have a look at the Threshold option in AppenderSkeleton. Second, by default the 
SMTPAppender will hold and buffer logging messages of any priority and trigger an 
email message when an error occurs with all the logs in the buffer. Hope this helps, 
Ceki

At 14:01 23.02.2001 -0600, Wes wrote:
>Sorry if this is a duplicate, but I used a different return address and I don't think 
>it made it to the list.
>----- Original Message ----- 
>From: <mailto:[EMAIL PROTECTED]>Wes Rood 
>To: <mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED] 
>Sent: Friday, February 23, 2001 11:52 AM
>Subject: SmtpAppender for ERROR conditions
>
>We're currently logging DEBUG priority statements to std out and a log file, now we'd 
>like to send email for serious problems in the code.
> 
>our original config file was:
>log4j.rootCategory=DEBUG, STD_OUT, ROOT_FILE
>And we changed it to:
>log4j.rootCategory=ERROR, EMAIL
>log4j.category.com=DEBUG, STD_OUT, ROOT_FILE
>(I'll omit the configuration of each appender...)
> 
>All of our categories are named after the full package name of the class they're in, 
>so "log4j.category.com" effectively covers all our categories.
> 
>Is this the best way to do it?.. it just seems strange that rootCategory is the email 
>appender, while log4j.category.com (which is also a "root" category) is set to what 
>rootCategory used to be.  Am I missing some concepts?
> 
>One other way would be to define a new category called "mail", and then our code 
>would have to instantiate another category for emailing, in addition to the normal 
>category named after the individual class.
> 
>Any ideas?
> 
>Thanks,
>Wes
> 
> 
> 
> 
> 

----
Ceki Gülcü          Web:   http://qos.ch      
av. de Rumine 5     email: [EMAIL PROTECTED] (preferred)
CH-1005 Lausanne           [EMAIL PROTECTED]
Switzerland         Tel: ++41 21 351 23 15


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

Reply via email to