Class LoggingInterceptor

java.lang.Object
com.google.ads.googleads.lib.logging.LoggingInterceptor
All Implemented Interfaces:
io.grpc.ClientInterceptor

public class LoggingInterceptor extends Object implements io.grpc.ClientInterceptor
An interceptor which logs all RPCs made on a Channel.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final io.grpc.Metadata.Key<String>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    LoggingInterceptor(RequestLogger requestLogger, com.google.common.collect.ImmutableMap<String,String> headers, String endpoint)
    Creates with the RequestLogger sink, the constant header data, and the API endpoint.
  • Method Summary

    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • REQUEST_ID_HEADER_KEY

      public static final io.grpc.Metadata.Key<String> REQUEST_ID_HEADER_KEY
  • Constructor Details

    • LoggingInterceptor

      public LoggingInterceptor(RequestLogger requestLogger, com.google.common.collect.ImmutableMap<String,String> headers, String endpoint)
      Creates with the RequestLogger sink, the constant header data, and the API endpoint.
  • Method Details

    • 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:
      interceptCall in interface io.grpc.ClientInterceptor