Package io.vrap.rmf.base.client.http
Interface InternalLoggerMiddleware
- All Superinterfaces:
Middleware
Middleware instrumenting the
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.
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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) 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, ResponseLogFormatter responseLogFormatter, ErrorLogFormatter errorLogFormatter) Methods inherited from interface io.vrap.rmf.base.client.http.Middleware
invoke
-
Method Details
-
of
-
of
static InternalLoggerMiddleware of(InternalLoggerFactory internalLoggerFactory, org.slf4j.event.Level responseLogEvent, org.slf4j.event.Level deprecationLogEvent) -
of
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) -
of
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, ResponseLogFormatter responseLogFormatter, ErrorLogFormatter errorLogFormatter)
-