Class LoggingInterceptor
- java.lang.Object
-
- com.google.ads.googleads.lib.logging.LoggingInterceptor
-
- All Implemented Interfaces:
io.grpc.ClientInterceptor
public class LoggingInterceptor extends java.lang.Object implements io.grpc.ClientInterceptorAn interceptor which logs all RPCs made on a Channel.
-
-
Field Summary
Fields Modifier and Type Field Description static io.grpc.Metadata.Key<java.lang.String>REQUEST_ID_HEADER_KEY
-
Constructor Summary
Constructors Constructor Description LoggingInterceptor(RequestLogger requestLogger, com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> headers, java.lang.String endpoint)Creates with the RequestLogger sink, the constant header data, and the API endpoint.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <ReqT,RespT>
io.grpc.ClientCall<ReqT,RespT>interceptCall(io.grpc.MethodDescriptor<ReqT,RespT> method, io.grpc.CallOptions callOptions, io.grpc.Channel next)Logs the Google Ads API fields required for debugging.
-
-
-
Constructor Detail
-
LoggingInterceptor
public LoggingInterceptor(RequestLogger requestLogger, com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> headers, java.lang.String endpoint)
Creates with the RequestLogger sink, the constant header data, and the API endpoint.
-
-
Method Detail
-
interceptCall
public <ReqT,RespT> io.grpc.ClientCall<ReqT,RespT> interceptCall(io.grpc.MethodDescriptor<ReqT,RespT> method, io.grpc.CallOptions callOptions, io.grpc.Channel next)Logs the Google Ads API fields required for debugging.- Specified by:
interceptCallin interfaceio.grpc.ClientInterceptor
-
-