Package com.massifmaps.utils
Class Log
java.lang.Object
com.massifmaps.utils.Log
A diagnostic log for various SDK events.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidLogs specified debug message (if debug logging is enabled).static voidLogs specified error message (if error logging is enabled).static voidLogs specified fatal error message and terminates.static LogEventListenerReturns the current log listener.static StringgetTag()Returns the tag for the log events.static voidLogs specified info message (if info logging is enabled).static booleanReturns the state of internal debug message logging.static booleanReturns the state of error logging.static booleanReturns the state of general info logging.static booleanReturns the state of warning logging.static voidsetLogEventListener(LogEventListener listener) Sets the log listener that can be used to intercept log messages.static voidsetShowDebug(boolean showDebug) Enables or disables writing internal debug messages to the log.static voidsetShowError(boolean showError) Enables or disables writing error messages to the log.static voidsetShowInfo(boolean showInfo) Enables or disables writing info messages to the log.static voidsetShowWarn(boolean showWarn) Enables or disables writing warning messages to the log.static voidSets the tag for the log events.static voidLogs specified warning message (if warning logging is enabled).
-
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
Returns the tag for the log events.- Returns:
- The current tag for the log events.
-
setTag
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
Returns the current log listener.- Returns:
- The current log event listener.
-
setLogEventListener
Sets the log listener that can be used to intercept log messages.- Parameters:
listener- The log event listener.
-
fatal
Logs specified fatal error message and terminates.- Parameters:
message- The message to log.
-
error
Logs specified error message (if error logging is enabled).- Parameters:
message- The message to log.
-
warn
Logs specified warning message (if warning logging is enabled).- Parameters:
message- The message to log.
-
info
Logs specified info message (if info logging is enabled).- Parameters:
message- The message to log.
-
debug
Logs specified debug message (if debug logging is enabled).- Parameters:
message- The message to log.
-