You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Volkan Yazici (Jira)" <ji...@apache.org> on 2021/10/19 06:42:00 UTC

[jira] [Updated] (LOG4J2-3172) SmtpManager sends emails with OFF level messages

     [ https://issues.apache.org/jira/browse/LOG4J2-3172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Volkan Yazici updated LOG4J2-3172:
----------------------------------
    Fix Version/s: 2.15.0

> SmtpManager sends emails with OFF level messages
> ------------------------------------------------
>
>                 Key: LOG4J2-3172
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3172
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.14.1
>            Reporter: Barry Fleming
>            Assignee: Volkan Yazici
>            Priority: Major
>             Fix For: 2.15.0
>
>
> I occasionally receive emails with logs that have OFF level and no message when using <SMTP> with a filter and the setting -Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector.
> I believe the cause is that AsyncLoggerContextSelector uses RingBufferLogEvents, and when the filter matches these events are buffered by the SmtpManager and then cleared soon after by the RingBufferLogEventHandler. Once the SmtpManager's buffer has filled, the empty events are added to the email.
> There is logic in SmtpManager.add(LogEvent) to copy the contents of mutable messages, and it might be appropriate to do the same for RingBufferLogEvents.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)