Bug 47142

Summary: add buildEmailBody() method to log4j SMTPAppender
Product: Log4j - Now in Jira Reporter: Sean C. Sullivan <apache-bugzilla>
Component: AppenderAssignee: log4j-dev <log4j-dev>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: P2    
Version: 1.2   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X 10.4   
Attachments: patch for SMTPAppender.java

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.