Package io.smooch.core
Class Logger
- java.lang.Object
-
- io.smooch.core.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 anLog.DEBUG
level log messagestatic void
d(java.lang.String logTag, java.lang.String message, java.lang.Throwable throwable, java.lang.Object... args)
Logs aLog.DEBUG
level log messagestatic void
e(java.lang.String logTag, java.lang.String message, java.lang.Object... args)
Logs anLog.ERROR
level log messagestatic void
e(java.lang.String logTag, java.lang.String message, java.lang.Throwable throwable, java.lang.Object... args)
Logs aLog.ERROR
level log messagestatic void
i(java.lang.String logTag, java.lang.String message, java.lang.Object... args)
Logs anLog.INFO
level log messagestatic void
i(java.lang.String logTag, java.lang.String message, java.lang.Throwable throwable, java.lang.Object... args)
Logs aLog.INFO
level log messagestatic boolean
isEnabled()
Returns the enabled state of the Logger.static void
setEnabled(boolean isEnabled)
Sets the enabled/disabled state of theLogger
static void
v(java.lang.String logTag, java.lang.String message, java.lang.Object... args)
Logs aLog.VERBOSE
log messagestatic void
v(java.lang.String logTag, java.lang.String message, java.lang.Throwable throwable, java.lang.Object... args)
Logs aLog.VERBOSE
level log messagestatic void
w(java.lang.String logTag, java.lang.String message, java.lang.Object... args)
Logs anLog.WARN
level log messagestatic void
w(java.lang.String logTag, java.lang.String message, java.lang.Throwable throwable, java.lang.Object... args)
Logs aLog.WARN
level log message
-
-
-
Method Detail
-
setEnabled
public static void setEnabled(boolean isEnabled)
Sets the enabled/disabled state of theLogger
- 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 aLog.VERBOSE
log message- Parameters:
logTag
- The log tag for the log messagemessage
- The body text for the log messageargs
- 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 aLog.VERBOSE
level log message- Parameters:
logTag
- The log tag for the log messagemessage
- The body text for the log messagethrowable
- A throwable exception to be written to the log messageargs
- Arguments used for formatted string messages
-
i
public static void i(java.lang.String logTag, java.lang.String message, java.lang.Object... args)
Logs anLog.INFO
level log message- Parameters:
logTag
- The log tag for the log messagemessage
- The body text for the log messageargs
- 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 aLog.INFO
level log message- Parameters:
logTag
- The log tag for the log messagemessage
- The body text for the log messagethrowable
- A throwable exception to be written to the log messageargs
- Arguments used for formatted string messages
-
d
public static void d(java.lang.String logTag, java.lang.String message, java.lang.Object... args)
Logs anLog.DEBUG
level log message- Parameters:
logTag
- The log tag for the log messagemessage
- The body text for the log messageargs
- 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 aLog.DEBUG
level log message- Parameters:
logTag
- The log tag for the log messagemessage
- The body text for the log messagethrowable
- A throwable exception to be written to the log messageargs
- Arguments used for formatted string messages
-
w
public static void w(java.lang.String logTag, java.lang.String message, java.lang.Object... args)
Logs anLog.WARN
level log message- Parameters:
logTag
- The log tag for the log messagemessage
- The body text for the log messageargs
- 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 aLog.WARN
level log message- Parameters:
logTag
- The log tag for the log messagemessage
- The body text for the log messagethrowable
- A throwable exception to be written to the log messageargs
- Arguments used for formatted string messages
-
e
public static void e(java.lang.String logTag, java.lang.String message, java.lang.Object... args)
Logs anLog.ERROR
level log message- Parameters:
logTag
- The log tag for the log messagemessage
- The body text for the log messageargs
- 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 aLog.ERROR
level log message- Parameters:
logTag
- The log tag for the log messagemessage
- The body text for the log messagethrowable
- A throwable exception to be written to the log messageargs
- Arguments used for formatted string messages
-
-