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
 
 
 
 
 


The information in this e-mail, and any attachment therein,
is confidential and for use by the addressee only.
If you are not the intended recipient, please return the
e-mail to the sender and delete it from your computer.
Although BNY Clearing Services LLC attempts to
sweep e-mail and attachments for viruses, it does not
guarantee that either are virus-free and accepts
no liability for any damage sustained as a result of viruses.

Reply via email to