[
https://issues.apache.org/jira/browse/LOG4J2-2429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16625085#comment-16625085
]
ASF GitHub Bot commented on LOG4J2-2429:
----------------------------------------
GitHub user andrei-ivanov opened a pull request:
https://github.com/apache/logging-log4j-audit/pull/10
[LOG4J2-2429]
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/andrei-ivanov/logging-log4j-audit LOG4J2-2429
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/logging-log4j-audit/pull/10.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #10
----
commit 16fa48335b4ff7f06102689f237b5f4e7d398f79
Author: Andrei Ivanov <andrei.ivanov@...>
Date: 2018-09-23T12:00:00Z
[LOG4J2-2429] don't cascade on method invocations
commit 3f3a56f43781d5d5735a2154bfddab4414778a92
Author: Andrei Ivanov <andrei.ivanov@...>
Date: 2018-09-23T12:02:52Z
[LOG4J2-2429] use same formatting as surrounding lines
commit da385005f631386b72255910db9579b84064b96c
Author: Andrei Ivanov <andrei.ivanov@...>
Date: 2018-09-23T12:04:36Z
[LOG4J2-2429] cleanup assertions
----
> 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
>
> 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)