Bug 45980 - SMTPAppender should have a sendOnClose option
Summary: SMTPAppender should have a sendOnClose option
Alias: None
Product: Log4j - Now in Jira
Classification: Unclassified
Component: Appender (show other bugs)
Version: 1.2
Hardware: PC Mac OS X 10.4
: P2 normal
Target Milestone: ---
Assignee: log4j-dev
Depends on:
Reported: 2008-10-09 14:21 UTC by Curt Arnold
Modified: 2008-10-09 14:25 UTC (History)
0 users


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:


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?



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.