Skip to content

Commit

Permalink
+ better worker context switch
Browse files Browse the repository at this point in the history
  • Loading branch information
q3769 committed Apr 26, 2024
1 parent ec10349 commit 0a45b39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/elf4j/engine/service/writer/GroupWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private static List<LogWriterType> getLogWriterTypes(@NonNull LogServiceConfigur

private static Runnable withMdcContext(Runnable task) {
Map<String, String> callerContext = MDC.getCopyOfContextMap();
return (callerContext == null)
return (callerContext == null || callerContext.isEmpty())
? task
: () -> {
Map<String, String> workerContext = replaceContextWith(callerContext);
Expand Down

0 comments on commit 0a45b39

Please sign in to comment.