Andrei Ivanov created LOG4J2-2429:
-------------------------------------
Summary: 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
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)