Annotation Interface LoggingDecorator
@Repeatable(LoggingDecorators.class)
@Retention(RUNTIME)
@Target({TYPE,METHOD})
public @interface LoggingDecorator
A
LoggingService decorator for annotated HTTP services.-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionTheLogLevelto use when logging failure responses (e.g., failed with an exception).floatThe rate at which to sample failed requests to log.intThe order of decoration, where aDecoratorof lower value will be applied first.TheLogLevelto use when logging requests.floatDeprecated.TheLogLevelto use when logging successful responses (e.g., no unhandled exception).floatThe rate at which to sample success requests to log.
-
Element Details
-
requestLogLevel
LogLevel requestLogLevelTheLogLevelto use when logging requests. If unset, will useLogLevel.TRACE.- Default:
TRACE
-
successfulResponseLogLevel
LogLevel successfulResponseLogLevelTheLogLevelto use when logging successful responses (e.g., no unhandled exception). If unset, will useLogLevel.TRACE.- Default:
TRACE
-
failureResponseLogLevel
LogLevel failureResponseLogLevelTheLogLevelto use when logging failure responses (e.g., failed with an exception). If unset, will useLogLevel.WARN.- Default:
WARN
-
samplingRate
Deprecated.The rate at which to sample requests to log. Any number between0.0and1.0will 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. This attribute sets both success and failure sampling rate.- Default:
1.0f
-
successSamplingRate
float successSamplingRateThe rate at which to sample success requests to log. Any number between0.0and1.0will 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,samplingRate()will be used to sample successful requests. If the value of this attribute is negative, the value fromsamplingRate()will be used as a fallback.- Default:
-1.0f
-
failureSamplingRate
float failureSamplingRateThe rate at which to sample failed requests to log. Any number between0.0and1.0will 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,samplingRate()will be used to sample failed requests. If the value of this attribute is negative, the value fromsamplingRate()will be used as a fallback.- Default:
-1.0f
-
order
int orderThe order of decoration, where aDecoratorof lower value will be applied first.- Default:
0
-
successSamplingRate()andfailureSamplingRate().