public class

Log

extends Object
java.lang.Object
   ↳ com.carto.utils.Log

Class Overview

A diagnostic log for various SDK events.

Summary

Public Methods
static void debug(String message)
Logs specified debug message (if debug logging is enabled).
synchronized void delete()
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.
static LogEventListener getLogEventListener()
Returns the current log listener.
static String getTag()
Returns the tag for the log events.
static void info(String message)
Logs specified info message (if info logging is enabled).
static boolean isShowDebug()
Returns the state of internal debug message logging.
static boolean isShowError()
Returns the state of error logging.
static boolean isShowInfo()
Returns the state of general info logging.
static boolean isShowWarn()
Returns the state of warning logging.
static void setLogEventListener(LogEventListener listener)
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 setTag(String tag)
Sets the tag for the log events.
static void warn(String message)
Logs specified warning message (if warning logging is enabled).
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static void debug (String message)

Logs specified debug message (if debug logging is enabled).

Parameters
message The message to log.

public synchronized void delete ()

public static void error (String message)

Logs specified error message (if error logging is enabled).

Parameters
message The message to log.

public static void fatal (String message)

Logs specified fatal error message and terminates.

Parameters
message The message to log.

public static LogEventListener getLogEventListener ()

Returns the current log listener.

Returns
  • The current log event listener.

public static String getTag ()

Returns the tag for the log events.

Returns
  • The current tag for the log events.

public static void info (String message)

Logs specified info message (if info logging is enabled).

Parameters
message The message to log.

public static boolean isShowDebug ()

Returns the state of internal debug message logging.

Returns
  • True if debug messages are shown in the log.

public static boolean isShowError ()

Returns the state of error logging.

Returns
  • True if errors are shown in the log.

public static boolean isShowInfo ()

Returns the state of general info logging.

Returns
  • True if general info is shown in the log.

public static boolean isShowWarn ()

Returns the state of warning logging.

Returns
  • True if warnings are shown in the log.

public static void setLogEventListener (LogEventListener listener)

Sets the log listener that can be used to intercept log messages.

Parameters
listener The log event listener.

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.

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.

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.

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.

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.

public static void warn (String message)

Logs specified warning message (if warning logging is enabled).

Parameters
message The message to log.