Skip to content

Commit

Permalink
Makes SubstituteLogger location aware
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ppkarwasz committed Oct 23, 2024
1 parent 69c333d commit 58ad526
Show file tree
Hide file tree
Showing 3 changed files with 222 additions and 100 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ public void addArgument(Object p) {
}

public void addArguments(Object... args) {
getNonNullArguments().addAll(Arrays.asList(args));
if (args != null) {
getNonNullArguments().addAll(Arrays.asList(args));
}
}

private List<Object> getNonNullArguments() {
Expand Down
Loading

0 comments on commit 58ad526

Please sign in to comment.