Class LogLevelServerFilter
java.lang.Object
io.kokuwa.micronaut.logging.http.AbstractMdcFilter
io.kokuwa.micronaut.logging.http.level.LogLevelServerFilter
- All Implemented Interfaces:
io.micronaut.core.order.Ordered,io.micronaut.http.filter.HttpFilter,io.micronaut.http.filter.HttpServerFilter
@Refreshable
@Requires(property="logger.http.level.enabled",
notEquals="false")
@Filter("${logger.http.level.path:/**}")
public class LogLevelServerFilter
extends AbstractMdcFilter
Http request logging filter.
- Author:
- Stephan Schnabel
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final intstatic final Stringstatic final Stringstatic final StringFields inherited from class io.kokuwa.micronaut.logging.http.AbstractMdcFilter
log, order, prefixFields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionLogLevelServerFilter(LogbackUtil logback, Optional<String> header, Optional<Integer> order) -
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>>doFilter(io.micronaut.http.HttpRequest<?> request, io.micronaut.http.filter.ServerFilterChain chain) Methods inherited from class io.kokuwa.micronaut.logging.http.AbstractMdcFilter
doFilter, getOrderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.http.filter.HttpServerFilter
doFilter
-
Field Details
-
PREFIX
- See Also:
-
DEFAULT_HEADER
- See Also:
-
DEFAULT_ORDER
public static final int DEFAULT_ORDER -
MDC_KEY
- See Also:
-
MDC_FILTER
- See Also:
-
-
Constructor Details
-
LogLevelServerFilter
public LogLevelServerFilter(LogbackUtil logback, @Value("${logger.http.level.header}") Optional<String> header, @Value("${logger.http.level.order}") Optional<Integer> order)
-
-
Method Details
-
doFilter
public org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>> doFilter(io.micronaut.http.HttpRequest<?> request, io.micronaut.http.filter.ServerFilterChain chain)
-