Closed
Description
Description
In order to allow changing the fqcn (and support other wrapping frameworks like slf4j kotlin-logging) in fluent api that logs line numbers, should make Log4jEventBuilder implement CallerBoundaryAware.
Configuration
Version: 2.20
Logs
LoggingWithLocationTest[jvm] > testNullLoggingWithLocationEntryExitOpt()[jvm] FAILED
org.opentest4j.AssertionFailedError: expected: <TRACE ClassWithLoggingForLocationTesting.logExitOpt(26) - entry with (1, 2)
INFO ClassWithLoggingForLocationTesting.logExitOpt(27) - log entry body
TRACE ClassWithLoggingForLocationTesting.logExitOpt(28) - exit with (null)> but was: <TRACE ClassWithLoggingForLocationTesting.logExitOpt(26) - entry with (1, 2)
INFO LocationAwareKLogger.at(46) - log entry body
Reproduction
See reproduction here: oshai/kotlin-logging@92378ee
The code switches to fluent api, and the unit test in github actions fails. For example: LoggingWithLocationTest.testNullLoggingWithLocationEntryExitOpt()
with the output above.
I can add a fix if you'd like.
Metadata
Metadata
Assignees
Labels
No labels