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: Wes Rood
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
 
 
 
 
 

Reply via email to