Skip to content

Commit 58ad526

Browse files
committed
Makes SubstituteLogger location aware
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.
1 parent 69c333d commit 58ad526

File tree

3 files changed

+222
-100
lines changed

3 files changed

+222
-100
lines changed

slf4j-api/src/main/java/org/slf4j/event/DefaultLoggingEvent.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ public void addArgument(Object p) {
5252
}
5353

5454
public void addArguments(Object... args) {
55-
getNonNullArguments().addAll(Arrays.asList(args));
55+
if (args != null) {
56+
getNonNullArguments().addAll(Arrays.asList(args));
57+
}
5658
}
5759

5860
private List<Object> getNonNullArguments() {

0 commit comments

Comments
 (0)