public final class LoggingServiceBuilder extends LoggingDecoratorBuilder<LoggingServiceBuilder>
LoggingService.| Constructor and Description |
|---|
LoggingServiceBuilder() |
| Modifier and Type | Method and Description |
|---|---|
LoggingService |
build(HttpService delegate)
Returns a newly-created
LoggingService decorating HttpService based on the properties
of this builder. |
Function<? super HttpService,LoggingService> |
newDecorator()
Returns a newly-created
LoggingService decorator based on the properties of this builder. |
LoggingServiceBuilder |
sampler(Sampler<? super ServiceRequestContext> sampler)
Sets the
Sampler that determines which request needs logging. |
LoggingServiceBuilder |
samplingRate(float samplingRate)
Sets the rate at which to sample requests to log.
|
contentSanitizer, failedResponseLogLevel, failureResponseLogLevel, headersSanitizer, logger, logger, requestContentSanitizer, requestContentSanitizer, requestHeadersSanitizer, requestHeadersSanitizer, requestLogLevel, requestLogLevel, requestLogLevelMapper, requestLogLevelMapper, requestTrailersSanitizer, requestTrailersSanitizer, responseCauseSanitizer, responseCauseSanitizer, responseContentSanitizer, responseContentSanitizer, responseHeadersSanitizer, responseHeadersSanitizer, responseLogLevelMapper, responseLogLevelMapper, responseTrailersSanitizer, responseTrailersSanitizer, successfulResponseLogLevel, successfulResponseLogLevel, toStringpublic LoggingServiceBuilder sampler(Sampler<? super ServiceRequestContext> sampler)
Sampler that determines which request needs logging.public LoggingServiceBuilder samplingRate(float samplingRate)
0.0 and 1.0 will
cause a random sample of the requests to be logged.public LoggingService build(HttpService delegate)
LoggingService decorating HttpService based on the properties
of this builder.public Function<? super HttpService,LoggingService> newDecorator()
LoggingService decorator based on the properties of this builder.Copyright © 2020 LeanCloud. All rights reserved.