Annotation Type LoggingDecorator
@Repeatable(LoggingDecorators.class) @Retention(RUNTIME) @Target({TYPE,METHOD}) public @interface LoggingDecorator
A
LoggingService
decorator for annotated HTTP services.-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description LogLevel
failureResponseLogLevel
TheLogLevel
to use when logging failure responses (e.g., failed with an exception).int
order
The order of decoration, where aDecorator
of lower value will be applied first.LogLevel
requestLogLevel
TheLogLevel
to use when logging requests.float
samplingRate
The rate at which to sample requests to log.LogLevel
successfulResponseLogLevel
TheLogLevel
to use when logging successful responses (e.g., no unhandled exception).
-
Element Details
-
requestLogLevel
LogLevel requestLogLevelTheLogLevel
to use when logging requests. If unset, will useLogLevel.TRACE
.- Default:
- TRACE
-
successfulResponseLogLevel
LogLevel successfulResponseLogLevelTheLogLevel
to use when logging successful responses (e.g., no unhandled exception). If unset, will useLogLevel.TRACE
.- Default:
- TRACE
-
failureResponseLogLevel
LogLevel failureResponseLogLevelTheLogLevel
to use when logging failure responses (e.g., failed with an exception). If unset, will useLogLevel.WARN
.- Default:
- WARN
-
samplingRate
float samplingRateThe rate at which to sample requests to log. Any number between0.0
and1.0
will cause a random sample of the requests to be logged. The random sampling is appropriate for low-traffic (ex servers that each receive <100K requests). If unset, all requests will be logged.- Default:
- 1.0f
-
order
int orderThe order of decoration, where aDecorator
of lower value will be applied first.- Default:
- 0
-