Class PathMdcFilter

  • All Implemented Interfaces:
    io.micronaut.core.order.Ordered, io.micronaut.http.filter.HttpFilter, io.micronaut.http.filter.HttpServerFilter

    @Refreshable
    @Requires(property="logger.http.path.enabled",notEquals="false") @Requires(property="logger.http.path.patterns")
    @Filter("${logger.http.path.path:/**}")
    public class PathMdcFilter
    extends AbstractMdcFilter
    Filter to add request path parts to MDC.
    Author:
    Stephan Schnabel
    • Field Detail

      • DEFAULT_ORDER

        public static final int DEFAULT_ORDER
      • PATTERN_GROUPS

        public static final Pattern PATTERN_GROUPS
    • Constructor Detail

      • PathMdcFilter

        public PathMdcFilter​(@Value("${logger.http.path.patterns}")
                             List<String> patterns,
                             @Value("${logger.http.path.prefix}")
                             Optional<String> prefix,
                             @Value("${logger.http.path.order}")
                             Optional<Integer> order)
    • Method Detail

      • doFilter

        public org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>> doFilter​(io.micronaut.http.HttpRequest<?> request,
                                                                                                io.micronaut.http.filter.ServerFilterChain chain)