[logback-dev] [JIRA] Updated: (LBCLASSIC-221) SMTPAppender includes irrelevant logging events

Jacob Wu (JIRA) noreply-jira at qos.ch
Fri Feb 10 23:46:26 CET 2012

     [ http://jira.qos.ch/browse/LBCLASSIC-221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacob Wu updated LBCLASSIC-221:

    Attachment: smtp-appender-upgrade_to-v1.0.0.patch

We also needed a way for the SMTPAppender to clear the buffer after every event that triggered an email to be sent.  The attached patch is meant to be applied to the git tag "v_1.0.0" and will enable a new _clearBufferOnTrigger_ option.

In the logback.xml configuration file this feature can be turned on by setting the node "<clearBufferOnTrigger/>" to "true".  By default this option is set to "false" so that the SMTPAppender will work like it does in v_1.0.0 now.

<appender name="EMAIL" class="ch.qos.logback.classic.net.SMTPAppender">
    <layout class="ch.qos.logback.classic.html.HTMLLayout">

    <!-- enables the new feature -->

> SMTPAppender includes irrelevant logging events
> -----------------------------------------------
>                 Key: LBCLASSIC-221
>                 URL: http://jira.qos.ch/browse/LBCLASSIC-221
>             Project: logback-classic
>          Issue Type: Bug
>          Components: appender
>    Affects Versions: 0.9.24
>         Environment: Java6, Tomcat6
>            Reporter: Chris Cheshire
>            Assignee: Ceki Gulcu
>         Attachments: smtp-appender-upgrade_to-v1.0.0.patch
> The BufferSize parameter to SMTPAppender has been removed with no replacement. When the SMTPAppender is triggered by an error event it also includes the previous 255 logging events, whether they were errors or not (now that the buffer size is fixed).
> By using BufferSize = 1, I was able to send a single error email every time an error occurred with just that error. Now I get completely irrelevant logging events, potentially days old with nothing to do with the error being logged and no simple way to change this.
> I'm not sure what version this was introduced - I just upgraded from 0.9.17 to 0.9.24.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the logback-dev mailing list