public interface InternalLoggerMiddleware extends Middleware
InternalLogger
Responses are logged by default with Level.INFO.
In case of an deprecation header the notice will be logged with Level.INFO
Any exception will be logged with Level.ERROR
The response, deprecation and error logger levels are configurable. Additionally, a map can be provided with the key a throwable type class and the value of the log level the exception should be logged with
The middleware logs with debug also the request and the whole response including headers. With trace level the request and response will be logged pretty printed.
All log events are written as lambda function to avoid rendering the message if the respective level is not enabled.
| Modifier and Type | Method and Description |
|---|---|
static InternalLoggerMiddleware |
of(InternalLoggerFactory internalLoggerFactory) |
static InternalLoggerMiddleware |
of(InternalLoggerFactory internalLoggerFactory,
org.slf4j.event.Level responseLogEvent,
org.slf4j.event.Level deprecationLogEvent) |
static InternalLoggerMiddleware |
of(InternalLoggerFactory internalLoggerFactory,
org.slf4j.event.Level responseLogEvent,
org.slf4j.event.Level deprecationLogEvent,
org.slf4j.event.Level defaultExceptionLogEvent,
Map<Class<? extends Throwable>,org.slf4j.event.Level> exceptionLogEvents) |
invokestatic InternalLoggerMiddleware of(InternalLoggerFactory internalLoggerFactory)
static InternalLoggerMiddleware of(InternalLoggerFactory internalLoggerFactory, org.slf4j.event.Level responseLogEvent, org.slf4j.event.Level deprecationLogEvent)
static InternalLoggerMiddleware of(InternalLoggerFactory internalLoggerFactory, org.slf4j.event.Level responseLogEvent, org.slf4j.event.Level deprecationLogEvent, org.slf4j.event.Level defaultExceptionLogEvent, Map<Class<? extends Throwable>,org.slf4j.event.Level> exceptionLogEvents)