Bug 45980 - SMTPAppender should have a sendOnClose option
SMTPAppender should have a sendOnClose option
Status: RESOLVED FIXED
Product: Log4j
Classification: Unclassified
Component: Appender
1.2
PC Mac OS X 10.4
: P2 normal
: ---
Assigned To: log4j-dev
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-10-09 14:21 UTC by Curt Arnold
Modified: 2008-10-09 14:25 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Curt Arnold 2008-10-09 14:21:54 UTC
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 ERROR.
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,

----

The proposed enhancement is to add a sendOnClose property that if set to true would result in an email being sent at appender close if any logging requests had been buffered.
Comment 1 Curt Arnold 2008-10-09 14:25:12 UTC
Committed in rev 703263.