You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Rusty Wright <ru...@grunt.berkeley.edu> on 2005/07/14 21:47:30 UTC

SMTPAppender

I went and looked in the list archives and someone pointed out that 
SMTPAppender is set up to only log error level stuff.  The default 
TriggeringEventEvaluator it's using only triggers on error level.  So I 
wrote my own TriggeringEventEvaluator that always returns true and now 
it logs everything, but each call to log.whatever() generates a separate 
email.

The usefulness of SMTPAppender is eluding me.

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


Re: SMTPAppender

Posted by Paul Smith <ps...@aconex.com>.
It's useful when you want to know via email when a particular event  
happened (the triggering event, usually an ERROR of some sort) along  
with context logging lines before that triggering event to help you  
understand how the code came to that trigger point (hence a buffer  
size for this appender)

The SMTPAppender keeps hold of the last X events in the buffer until  
the trigger point, then sends the buffer with the trigger event via  
email to you.

What is the use case you want to send logging emails to yourself?

Paul

On 15/07/2005, at 5:47 AM, Rusty Wright wrote:

> I went and looked in the list archives and someone pointed out that  
> SMTPAppender is set up to only log error level stuff.  The default  
> TriggeringEventEvaluator it's using only triggers on error level.   
> So I wrote my own TriggeringEventEvaluator that always returns true  
> and now it logs everything, but each call to log.whatever()  
> generates a separate email.
>
> The usefulness of SMTPAppender is eluding me.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
>


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