logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "geek.shrek" <miss_cool_...@yahoo.com>
Subject Re: How to trigger email eventough there is no ERROR
Date Fri, 10 Oct 2008 00:42:15 GMT

I'm using log4j 1.2  with java 1.4.2

my log4j.properties
log4j.rootCategory=DEBUG, mail

log4j.appender.mail.layout.ConversionPattern=%d %p [%c] - %m %n

I also tried to create my own appender which extends SMTPAppender
and overide activateOptions and add  LogManager.getLoggerRepository().setThreshold(Level.WARN);

I still need to have an ERROR to be able to send email.

I'm trying to build the log4j that you just updated in the repository .. Thanks for that :)
, but I'm still struggling to build it with maven since I'm not so familiar with maven. But
it seems like exactly what I need for my application.


----- Original Message ----
From: Curt Arnold <carnold@apache.org>
To: Log4J Users List <log4j-user@logging.apache.org>
Sent: Friday, October 10, 2008 3:07:06 AM
Subject: Re: How to trigger email eventough there is no ERROR

On Oct 9, 2008, at 12:01 AM, geek.shrek wrote:

> Hi,
> I would like to send email on WARNING level or higher and append it  
> in the buffer. When I reach the end of my application I would like  
> to send email that collected in the buffer even though there is no  
> Is it possible to trigger sending email even though there is no ERROR?
> I've tried with the "TriggeringEventEvaluator" but it doesn't seem  
> to work
> I set the threshold level to WARN, but to send an email I still need  
> "ERROR" level to trigger sending an email.
> Can anyone help me with this?
> Thanks,

Could you provide your configuration file and version of log4j that is  
being used?  If you turn on log4j debugging (see below), do you get  
any diagnostic messages that might provide any insight.

To turn on internal debugging to console, set log4j.debug=true either  
using the -D command line switch or including in log4j.properties or  
add a debug="true" attribute to the log4j:configuration element in  

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message