Class Log

java.lang.Object
com.massifmaps.utils.Log

public class Log extends Object
A diagnostic log for various SDK events.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    debug(String message)
    Logs specified debug message (if debug logging is enabled).
    static void
    error(String message)
    Logs specified error message (if error logging is enabled).
    static void
    fatal(String message)
    Logs specified fatal error message and terminates.
    Returns the current log listener.
    static String
    Returns the tag for the log events.
    static void
    info(String message)
    Logs specified info message (if info logging is enabled).
    static boolean
    Returns the state of internal debug message logging.
    static boolean
    Returns the state of error logging.
    static boolean
    Returns the state of general info logging.
    static boolean
    Returns the state of warning logging.
    static void
    Sets the log listener that can be used to intercept log messages.
    static void
    setShowDebug(boolean showDebug)
    Enables or disables writing internal debug messages to the log.
    static void
    setShowError(boolean showError)
    Enables or disables writing error messages to the log.
    static void
    setShowInfo(boolean showInfo)
    Enables or disables writing info messages to the log.
    static void
    setShowWarn(boolean showWarn)
    Enables or disables writing warning messages to the log.
    static void
    Sets the tag for the log events.
    static void
    warn(String message)
    Logs specified warning message (if warning logging is enabled).

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • isShowError

      public static boolean isShowError()
      Returns the state of error logging.
      Returns:
      True if errors are shown in the log.
    • setShowError

      public static void setShowError(boolean showError)
      Enables or disables writing error messages to the log.
      Parameters:
      showError - If true, then error messages will be written to the log.
    • isShowWarn

      public static boolean isShowWarn()
      Returns the state of warning logging.
      Returns:
      True if warnings are shown in the log.
    • setShowWarn

      public static void setShowWarn(boolean showWarn)
      Enables or disables writing warning messages to the log.
      Parameters:
      showWarn - If true, then warning messages will be written to the log.
    • isShowInfo

      public static boolean isShowInfo()
      Returns the state of general info logging.
      Returns:
      True if general info is shown in the log.
    • setShowInfo

      public static void setShowInfo(boolean showInfo)
      Enables or disables writing info messages to the log.
      Parameters:
      showInfo - If true, then info messages will be written to the log.
    • isShowDebug

      public static boolean isShowDebug()
      Returns the state of internal debug message logging.
      Returns:
      True if debug messages are shown in the log.
    • setShowDebug

      public static void setShowDebug(boolean showDebug)
      Enables or disables writing internal debug messages to the log.
      Parameters:
      showDebug - If true, then debug messages will be written to the log.
    • getTag

      public static String getTag()
      Returns the tag for the log events.
      Returns:
      The current tag for the log events.
    • setTag

      public static void setTag(String tag)
      Sets the tag for the log events. The tag will be visible in the log and log messages can be filtered by the tag.
      Parameters:
      tag - The tag to use in the log events.
    • getLogEventListener

      public static LogEventListener getLogEventListener()
      Returns the current log listener.
      Returns:
      The current log event listener.
    • setLogEventListener

      public static void setLogEventListener(LogEventListener listener)
      Sets the log listener that can be used to intercept log messages.
      Parameters:
      listener - The log event listener.
    • fatal

      public static void fatal(String message)
      Logs specified fatal error message and terminates.
      Parameters:
      message - The message to log.
    • error

      public static void error(String message)
      Logs specified error message (if error logging is enabled).
      Parameters:
      message - The message to log.
    • warn

      public static void warn(String message)
      Logs specified warning message (if warning logging is enabled).
      Parameters:
      message - The message to log.
    • info

      public static void info(String message)
      Logs specified info message (if info logging is enabled).
      Parameters:
      message - The message to log.
    • debug

      public static void debug(String message)
      Logs specified debug message (if debug logging is enabled).
      Parameters:
      message - The message to log.