You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Andrei Ivanov (JIRA)" <ji...@apache.org> on 2018/09/24 07:20:00 UTC

[jira] [Closed] (LOG4J2-2429) Setting the exceptionHandler on the AuditEvent sets it as a ThreadContext variable

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

Andrei Ivanov closed LOG4J2-2429.
---------------------------------

Looks fine, thank you.

> Setting the exceptionHandler on the AuditEvent sets it as a ThreadContext variable
> ----------------------------------------------------------------------------------
>
>                 Key: LOG4J2-2429
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2429
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Log4j-Audit
>    Affects Versions: Log4j-Audit 1.0.0
>            Reporter: Andrei Ivanov
>            Priority: Major
>             Fix For: Log4j-Audit 1.0.1
>
>
> Setting the \{{exceptionHandler}} on the \{{AuditEvent}} triggers [this code|https://github.com/apache/logging-log4j-audit/blob/master/log4j-audit/log4j-audit-api/src/main/java/org/apache/logging/log4j/audit/LogEventFactory.java#L306], but it falls through after the set and ends up at line 315 and sets it as a \{{ThreadContext}} variable and ends up getting logged 🤦‍♂️
> {noformat}
> [AuditLogger] - Audit [cashPaymentOut amount="0.500" auditExceptionHandler="AuditEventLogger$$Lambda$137/1968918278@54de299" currency="CHF" reason="Cash return" salesTransaction="3b974661-d8ed-481d-b2fe-5f2979b40fa9"]
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)