Bug 47142 - add buildEmailBody() method to log4j SMTPAppender
add buildEmailBody() method to log4j SMTPAppender
Status: RESOLVED FIXED
Product: Log4j
Classification: Unclassified
Component: Appender
1.2
PC Mac OS X 10.4
: P2 enhancement
: ---
Assigned To: log4j-dev
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2009-05-02 16:04 UTC by Sean C. Sullivan
Modified: 2009-05-11 21:48 UTC (History)
0 users



Attachments
patch for SMTPAppender.java (1.31 KB, patch)
2009-05-02 16:06 UTC, Sean C. Sullivan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sean C. Sullivan 2009-05-02 16:04:49 UTC
Patch attached.

This patch adds a new method:  protected StringBuffer buildEmailBody()

This method makes it easier for subclasses to customize the email message body.
Comment 1 Sean C. Sullivan 2009-05-02 16:06:31 UTC
Created attachment 23598 [details]
patch for SMTPAppender.java
Comment 2 Curt Arnold 2009-05-11 21:12:43 UTC
Having a method return StringBuffer was a little strange.  I modified the name to String formatBody().  It will cause an extra StringBuffer allocation if encoding fails, but that is an edge case.

Committed in rev 773775.