Class LoggingClientBuilder
- java.lang.Object
-
- com.linecorp.armeria.common.logging.LoggingDecoratorBuilder<LoggingClientBuilder>
-
- com.linecorp.armeria.client.logging.LoggingClientBuilder
-
public class LoggingClientBuilder extends LoggingDecoratorBuilder<LoggingClientBuilder>
Builds a newLoggingClient
.
-
-
Constructor Summary
Constructors Constructor Description LoggingClientBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <I extends Request,O extends Response>
LoggingClient<I,O>build(Client<I,O> delegate)
Returns a newly-createdLoggingClient
decoratingdelegate
based on the properties of this builder.<I extends Request,O extends Response>
Function<Client<I,O>,LoggingClient<I,O>>newDecorator()
Returns a newly-createdLoggingClient
decorator based on the properties of this builder.LoggingClientBuilder
sampler(Sampler<? super ClientRequestContext> sampler)
Sets theSampler
that determines which request needs logging.LoggingClientBuilder
samplingRate(float samplingRate)
Sets the rate at which to sample requests to log.-
Methods inherited from class com.linecorp.armeria.common.logging.LoggingDecoratorBuilder
contentSanitizer, failedResponseLogLevel, failureResponseLogLevel, headersSanitizer, requestContentSanitizer, requestContentSanitizer, requestHeadersSanitizer, requestHeadersSanitizer, requestLogLevel, requestLogLevel, requestTrailersSanitizer, requestTrailersSanitizer, responseCauseSanitizer, responseCauseSanitizer, responseContentSanitizer, responseContentSanitizer, responseHeadersSanitizer, responseHeadersSanitizer, responseTrailersSanitizer, responseTrailersSanitizer, successfulResponseLogLevel, successfulResponseLogLevel, toString
-
-
-
-
Method Detail
-
sampler
public LoggingClientBuilder sampler(Sampler<? super ClientRequestContext> sampler)
Sets theSampler
that determines which request needs logging.
-
samplingRate
public LoggingClientBuilder samplingRate(float samplingRate)
Sets the 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.
-
build
public <I extends Request,O extends Response> LoggingClient<I,O> build(Client<I,O> delegate)
Returns a newly-createdLoggingClient
decoratingdelegate
based on the properties of this builder.
-
newDecorator
public <I extends Request,O extends Response> Function<Client<I,O>,LoggingClient<I,O>> newDecorator()
Returns a newly-createdLoggingClient
decorator based on the properties of this builder.
-
-