From 574be078efe04d972f91e7a30c647eb95ca1531e Mon Sep 17 00:00:00 2001 From: Stephan Schnabel Date: Tue, 4 Jan 2022 19:38:39 +0100 Subject: [PATCH] Improve logging. --- docs/features/http_mdc_header.md | 4 ++-- .../micronaut/logging/http/mdc/AuthenticationMdcFilter.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/features/http_mdc_header.md b/docs/features/http_mdc_header.md index db91c1e..8a8e9d4 100644 --- a/docs/features/http_mdc_header.md +++ b/docs/features/http_mdc_header.md @@ -21,8 +21,8 @@ logger: prefix: header. names: - x-request-id - - x-b3-traceId + - x-b3-traceId - x-b3-parentspanid - x-b3-spanid - - x-b3-sampled + - x-b3-sampled ``` diff --git a/src/main/java/io/kokuwa/micronaut/logging/http/mdc/AuthenticationMdcFilter.java b/src/main/java/io/kokuwa/micronaut/logging/http/mdc/AuthenticationMdcFilter.java index aea7557..adc2946 100644 --- a/src/main/java/io/kokuwa/micronaut/logging/http/mdc/AuthenticationMdcFilter.java +++ b/src/main/java/io/kokuwa/micronaut/logging/http/mdc/AuthenticationMdcFilter.java @@ -45,7 +45,7 @@ public class AuthenticationMdcFilter extends AbstractMdcFilter { this.name = name.orElse(DEFAULT_NAME); this.attributes = attributes.orElseGet(Set::of); if (name.isPresent() || !this.attributes.isEmpty()) { - log.info("Configured with name {} and attributes {}", name, attributes); + log.info("Configured with name {} and attributes {}", this.name, this.attributes); } }