Class RequestLogger


  • public class RequestLogger
    extends java.lang.Object
    Dispatches logging requests to the logging library, decoupling logging from the RPC interceptor.
    • Constructor Summary

      Constructors 
      Constructor Description
      RequestLogger()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isDetailEnabled​(org.slf4j.event.Level level)
      Checks if the detailed (request) logger is enabled.
      boolean isSummaryEnabled​(org.slf4j.event.Level level)
      Checks if the summary (headers/trailers) logger is enabled.
      void logDetail​(org.slf4j.event.Level level, com.google.ads.googleads.lib.logging.Event.Detail event)
      Logs the request/response of an RPC call.
      void logSummary​(org.slf4j.event.Level level, com.google.ads.googleads.lib.logging.Event.Summary event)
      Logs a summary of an RPC call.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RequestLogger

        public RequestLogger()
    • Method Detail

      • isDetailEnabled

        public boolean isDetailEnabled​(org.slf4j.event.Level level)
        Checks if the detailed (request) logger is enabled. This operation will complete quickly and can be used to guard expensive logger statements.
      • isSummaryEnabled

        public boolean isSummaryEnabled​(org.slf4j.event.Level level)
        Checks if the summary (headers/trailers) logger is enabled. This operation will complete quickly and can be used to guard expensive logger statements.
      • logSummary

        public void logSummary​(org.slf4j.event.Level level,
                               com.google.ads.googleads.lib.logging.Event.Summary event)
        Logs a summary of an RPC call. Has no effect if the logger is not enabled at the level requested.
      • logDetail

        public void logDetail​(org.slf4j.event.Level level,
                              com.google.ads.googleads.lib.logging.Event.Detail event)
        Logs the request/response of an RPC call. Has no effect if the logger is not enabled at the level requested.