Makes SubstituteLogger location aware#438
Conversation
Currently, `SubstituteLogger` neither supports location information from upstream callers nor passes location information to the delegated logger. This PR: - implements `LocationAwareLogger`, which allows upstream callers to pass location information both through the `LocationAwareLogger` API and the fluent API. - sets the correct caller boundary, when the classic API methods are invoked. Signed-off-by: Piotr P. Karwasz <piotr.github@karwasz.org>
58ad526 to
679bc22
Compare
|
@ppkarwasz Thank you for this PR. For the moment, I fail to see the circumstances under which the |
I am not entirely sure when
Since Newer mechanisms such as slf4j/slf4j-api/src/main/java/org/slf4j/spi/DefaultLoggingEventBuilder.java Lines 157 to 169 in 69c333d |
The `JDK14LoggerAdapter` class uses the wrong caller boundary for location unaware methods. This PR: - Sets the correct caller boundary for classic API method calls (`AbstractLogger`), - Adds the missing `LoggingEventAware` interface and fixes its implementation. The interface was previously implemented, but not declared. - Adds a test for qos-ch#425. The `SubstituteLogger` tests depend on qos-ch#438.
The `JDK14LoggerAdapter` class uses the wrong caller boundary for location unaware methods. This PR: - Sets the correct caller boundary for classic API method calls (`AbstractLogger`), - Adds the missing `LoggingEventAware` interface and fixes its implementation. The interface was previously implemented, but not declared. - Adds a test for qos-ch#425. The `SubstituteLogger` tests depend on qos-ch#438. Signed-off-by: Piotr P. Karwasz <piotr.github@karwasz.org>
Currently,
SubstituteLoggerneither supports location information from upstream callers nor passes location information to the delegated logger.This PR:
LocationAwareLogger, which allows upstream callers to pass location information both through theLocationAwareLoggerAPI and the fluent API.This is related to #425.