Class Logger



  • public class Logger
    extends java.lang.Object
    Simple wrapper around the android log

    The default behaviour is that it won't log until Logger.setEnabled(boolean) is called with true as the argument.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static void d(java.lang.String tag, java.lang.String message)
      Logs with a Log#DEBUG level.
      static void d(java.lang.String tag, java.lang.String message, java.lang.Throwable throwable)
      Logs with a Log#DEBUG level.
      static void e(java.lang.String tag, java.lang.String message)
      Logs with a Log#ERROR level.
      static void e(java.lang.String tag, java.lang.String message, java.lang.Throwable throwable)
      Logs with a Log#ERROR level.
      static void i(java.lang.String tag, java.lang.String message)
      Logs with a Log#INFO level.
      static void i(java.lang.String tag, java.lang.String message, java.lang.Throwable throwable)
      Logs with a Log#INFO level.
      static void v(java.lang.String tag, java.lang.String message)
      Logs with a Log#VERBOSE level.
      static void v(java.lang.String tag, java.lang.String message, java.lang.Throwable throwable)
      Logs with a Log#VERBOSE level.
      static void w(java.lang.String tag, java.lang.String message)
      Logs with a Log#WARN level.
      static void w(java.lang.String tag, java.lang.String message, java.lang.Throwable throwable)
      Logs with a Log#WARN level.
      • Methods inherited from class java.lang.Object

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

      • w

        public static void w(java.lang.String tag,
                             java.lang.String message)
        Logs with a Log#WARN level.
        Parameters:
        tag - The log tag to log with
        message - A message to print to the Logger.
      • w

        public static void w(java.lang.String tag,
                             java.lang.String message,
                             java.lang.Throwable throwable)
        Logs with a Log#WARN level.
        Parameters:
        tag - The log tag to log with
        message - A message to print to the Logger.
        throwable - A throwable representing an exception that occurred that will be written to the Logger.
      • e

        public static void e(java.lang.String tag,
                             java.lang.String message)
        Logs with a Log#ERROR level.
        Parameters:
        tag - The log tag to log with
        message - A message to print to the Logger.
      • e

        public static void e(java.lang.String tag,
                             java.lang.String message,
                             java.lang.Throwable throwable)
        Logs with a Log#ERROR level.
        Parameters:
        tag - The log tag to log with
        message - A message to print to the Logger.
        throwable - A throwable representing an exception that occurred that will be written to the Logger.
      • v

        public static void v(java.lang.String tag,
                             java.lang.String message)
        Logs with a Log#VERBOSE level.
        Parameters:
        tag - The log tag to log with
        message - A message to print to the Logger.
      • v

        public static void v(java.lang.String tag,
                             java.lang.String message,
                             java.lang.Throwable throwable)
        Logs with a Log#VERBOSE level.
        Parameters:
        tag - The log tag to log with
        message - A message to print to the Logger.
        throwable - A throwable representing an exception that occurred that will be written to the Logger.
      • i

        public static void i(java.lang.String tag,
                             java.lang.String message)
        Logs with a Log#INFO level.
        Parameters:
        tag - The log tag to log with
        message - A message to print to the Logger.
      • i

        public static void i(java.lang.String tag,
                             java.lang.String message,
                             java.lang.Throwable throwable)
        Logs with a Log#INFO level.
        Parameters:
        tag - The log tag to log with
        message - A message to print to the Logger.
        throwable - A throwable representing an exception that occurred that will be written to the Logger.
      • d

        public static void d(java.lang.String tag,
                             java.lang.String message)
        Logs with a Log#DEBUG level.
        Parameters:
        tag - The log tag to log with
        message - A message to print to the Logger.
      • d

        public static void d(java.lang.String tag,
                             java.lang.String message,
                             java.lang.Throwable throwable)
        Logs with a Log#DEBUG level.
        Parameters:
        tag - The log tag to log with
        message - A message to print to the Logger.
        throwable - A throwable representing an exception that occurred that will be written to the Logger.