Class Logger


  • public class Logger
    extends java.lang.Object
    Logger class that can be enabled/disable to assist with debugging SDK integrations without always printing information to the app output log.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void d​(java.lang.String logTag, java.lang.String message, java.lang.Object... args)
      Logs an Log.DEBUG level log message
      static void d​(java.lang.String logTag, java.lang.String message, java.lang.Throwable throwable, java.lang.Object... args)
      Logs a Log.DEBUG level log message
      static void e​(java.lang.String logTag, java.lang.String message, java.lang.Object... args)
      Logs an Log.ERROR level log message
      static void e​(java.lang.String logTag, java.lang.String message, java.lang.Throwable throwable, java.lang.Object... args)
      Logs a Log.ERROR level log message
      static void i​(java.lang.String logTag, java.lang.String message, java.lang.Object... args)
      Logs an Log.INFO level log message
      static void i​(java.lang.String logTag, java.lang.String message, java.lang.Throwable throwable, java.lang.Object... args)
      Logs a Log.INFO level log message
      static boolean isEnabled()
      Returns the enabled state of the Logger.
      static void setEnabled​(boolean isEnabled)
      Sets the enabled/disabled state of the Logger
      static void v​(java.lang.String logTag, java.lang.String message, java.lang.Object... args)
      Logs a Log.VERBOSE log message
      static void v​(java.lang.String logTag, java.lang.String message, java.lang.Throwable throwable, java.lang.Object... args)
      Logs a Log.VERBOSE level log message
      static void w​(java.lang.String logTag, java.lang.String message, java.lang.Object... args)
      Logs an Log.WARN level log message
      static void w​(java.lang.String logTag, java.lang.String message, java.lang.Throwable throwable, java.lang.Object... args)
      Logs a Log.WARN level log message
      • Methods inherited from class java.lang.Object

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

      • setEnabled

        public static void setEnabled​(boolean isEnabled)
        Sets the enabled/disabled state of the Logger
        Parameters:
        isEnabled - true if logging should be enabled, false otherwise
      • isEnabled

        public static boolean isEnabled()
        Returns the enabled state of the Logger.
        Returns:
        true if logging is enabled, false otherwise
      • v

        public static void v​(java.lang.String logTag,
                             java.lang.String message,
                             java.lang.Object... args)
        Logs a Log.VERBOSE log message
        Parameters:
        logTag - The log tag for the log message
        message - The body text for the log message
        args - Arguments used for formatted string messages
      • v

        public static void v​(java.lang.String logTag,
                             java.lang.String message,
                             java.lang.Throwable throwable,
                             java.lang.Object... args)
        Logs a Log.VERBOSE level log message
        Parameters:
        logTag - The log tag for the log message
        message - The body text for the log message
        throwable - A throwable exception to be written to the log message
        args - Arguments used for formatted string messages
      • i

        public static void i​(java.lang.String logTag,
                             java.lang.String message,
                             java.lang.Object... args)
        Logs an Log.INFO level log message
        Parameters:
        logTag - The log tag for the log message
        message - The body text for the log message
        args - Arguments used for formatted string messages
      • i

        public static void i​(java.lang.String logTag,
                             java.lang.String message,
                             java.lang.Throwable throwable,
                             java.lang.Object... args)
        Logs a Log.INFO level log message
        Parameters:
        logTag - The log tag for the log message
        message - The body text for the log message
        throwable - A throwable exception to be written to the log message
        args - Arguments used for formatted string messages
      • d

        public static void d​(java.lang.String logTag,
                             java.lang.String message,
                             java.lang.Object... args)
        Logs an Log.DEBUG level log message
        Parameters:
        logTag - The log tag for the log message
        message - The body text for the log message
        args - Arguments used for formatted string messages
      • d

        public static void d​(java.lang.String logTag,
                             java.lang.String message,
                             java.lang.Throwable throwable,
                             java.lang.Object... args)
        Logs a Log.DEBUG level log message
        Parameters:
        logTag - The log tag for the log message
        message - The body text for the log message
        throwable - A throwable exception to be written to the log message
        args - Arguments used for formatted string messages
      • w

        public static void w​(java.lang.String logTag,
                             java.lang.String message,
                             java.lang.Object... args)
        Logs an Log.WARN level log message
        Parameters:
        logTag - The log tag for the log message
        message - The body text for the log message
        args - Arguments used for formatted string messages
      • w

        public static void w​(java.lang.String logTag,
                             java.lang.String message,
                             java.lang.Throwable throwable,
                             java.lang.Object... args)
        Logs a Log.WARN level log message
        Parameters:
        logTag - The log tag for the log message
        message - The body text for the log message
        throwable - A throwable exception to be written to the log message
        args - Arguments used for formatted string messages
      • e

        public static void e​(java.lang.String logTag,
                             java.lang.String message,
                             java.lang.Object... args)
        Logs an Log.ERROR level log message
        Parameters:
        logTag - The log tag for the log message
        message - The body text for the log message
        args - Arguments used for formatted string messages
      • e

        public static void e​(java.lang.String logTag,
                             java.lang.String message,
                             java.lang.Throwable throwable,
                             java.lang.Object... args)
        Logs a Log.ERROR level log message
        Parameters:
        logTag - The log tag for the log message
        message - The body text for the log message
        throwable - A throwable exception to be written to the log message
        args - Arguments used for formatted string messages