Package com.batch.android.core
Class Logger
- java.lang.Object
-
- com.batch.android.core.Logger
-
public final class Logger extends java.lang.ObjectHelper to easily log into the application.Internal logs can be enabled using setprop log.tag.BatchInternal VERBOSE
-
-
Field Summary
Fields Modifier and Type Field Description static booleandevIs the logger in dev modestatic java.lang.StringINTERNAL_TAGInternal logger tag.static LoggerDelegateloggerDelegateLogger delegate (optional) The logger delegate is another logger which receives the same logs as this loggerstatic java.lang.StringPUBLIC_TAGPublic logger tag.
-
Constructor Summary
Constructors Constructor Description Logger()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiderror(java.lang.String msg)Error log with message.static voiderror(java.lang.String module, java.lang.String msg)Error log with module and message.static voiderror(java.lang.String module, java.lang.String msg, java.lang.Throwable t)Error log with module, message and throwable.static voiderror(java.lang.String msg, java.lang.Throwable t)Error log with message and throwable.static voidinfo(java.lang.String msg)Verbose log with message.static voidinfo(java.lang.String module, java.lang.String msg)Info log with module and message.static voidinfo(java.lang.String module, java.lang.String msg, java.lang.Throwable t)Info log with module, message and throwable.static voidinfo(java.lang.String msg, java.lang.Throwable t)Info log with message and throwable.static voidinternal(java.lang.String msg)Debug log with message.static voidinternal(java.lang.String module, java.lang.String msg)Debug log with module and message.static voidinternal(java.lang.String module, java.lang.String msg, java.lang.Throwable t)Debug log with module, message and throwable.static voidinternal(java.lang.String msg, java.lang.Throwable t)Internal log with message and throwable.static booleanshouldLogForLevel(LoggerLevel level)static voidverbose(java.lang.String msg)Verbose log with message.static voidverbose(java.lang.String module, java.lang.String msg)Verbose log with module and message.static voidverbose(java.lang.String module, java.lang.String msg, java.lang.Throwable t)Verbose log with module, message and throwable.static voidverbose(java.lang.String msg, java.lang.Throwable t)Verbose log with message and throwable.static voidwarning(java.lang.String msg)Warning log with message.static voidwarning(java.lang.String module, java.lang.String msg)Warning log with module and message.static voidwarning(java.lang.String module, java.lang.String msg, java.lang.Throwable t)Warning log with module, message and throwable.static voidwarning(java.lang.String msg, java.lang.Throwable t)Warning log with message and throwable.
-
-
-
Field Detail
-
PUBLIC_TAG
public static final java.lang.String PUBLIC_TAG
Public logger tag.- See Also:
- Constant Field Values
-
INTERNAL_TAG
public static final java.lang.String INTERNAL_TAG
Internal logger tag.- See Also:
- Constant Field Values
-
loggerDelegate
public static LoggerDelegate loggerDelegate
Logger delegate (optional) The logger delegate is another logger which receives the same logs as this logger
-
dev
public static final boolean dev
Is the logger in dev mode
-
-
Method Detail
-
shouldLogForLevel
public static boolean shouldLogForLevel(LoggerLevel level)
-
verbose
public static void verbose(java.lang.String module, java.lang.String msg, java.lang.Throwable t)Verbose log with module, message and throwable.- Parameters:
module- Module name.msg- Message of the error.t- Throwable exception.
-
verbose
public static void verbose(java.lang.String msg, java.lang.Throwable t)Verbose log with message and throwable.- Parameters:
msg- Message of the error.t- Throwable exception.
-
verbose
public static void verbose(java.lang.String module, java.lang.String msg)Verbose log with module and message.- Parameters:
module- Module name.msg- Message of the error.
-
verbose
public static void verbose(java.lang.String msg)
Verbose log with message.- Parameters:
msg- Message of the error.
-
info
public static void info(java.lang.String module, java.lang.String msg, java.lang.Throwable t)Info log with module, message and throwable.- Parameters:
module- Module name.msg- Message of the error.t- Throwable exception.
-
info
public static void info(java.lang.String msg, java.lang.Throwable t)Info log with message and throwable.- Parameters:
msg- Message of the error.t- Throwable exception.
-
info
public static void info(java.lang.String module, java.lang.String msg)Info log with module and message.- Parameters:
module- Module name.msg- Message of the error.
-
info
public static void info(java.lang.String msg)
Verbose log with message.- Parameters:
msg- Message of the error.
-
warning
public static void warning(java.lang.String module, java.lang.String msg, java.lang.Throwable t)Warning log with module, message and throwable.- Parameters:
module- Module name.msg- Message of the error.t- Throwable exception.
-
warning
public static void warning(java.lang.String msg, java.lang.Throwable t)Warning log with message and throwable.- Parameters:
msg- Message of the error.t- Throwable exception.
-
warning
public static void warning(java.lang.String module, java.lang.String msg)Warning log with module and message.- Parameters:
module- Module name.msg- Message of the error.
-
warning
public static void warning(java.lang.String msg)
Warning log with message.- Parameters:
msg- Message of the error.
-
error
public static void error(java.lang.String module, java.lang.String msg, java.lang.Throwable t)Error log with module, message and throwable.- Parameters:
module- Module name.msg- Message of the error.t- Throwable exception.
-
error
public static void error(java.lang.String msg, java.lang.Throwable t)Error log with message and throwable.- Parameters:
msg- Message of the error.t- Throwable exception.
-
error
public static void error(java.lang.String module, java.lang.String msg)Error log with module and message.- Parameters:
module- Module name.msg- Message of the error.
-
error
public static void error(java.lang.String msg)
Error log with message.- Parameters:
msg- Message of the error.
-
internal
public static void internal(java.lang.String module, java.lang.String msg, java.lang.Throwable t)Debug log with module, message and throwable.- Parameters:
module- Module name.msg- Message of the error.t- Throwable exception.
-
internal
public static void internal(java.lang.String msg, java.lang.Throwable t)Internal log with message and throwable.- Parameters:
msg- Message of the error.t- Throwable exception.
-
internal
public static void internal(java.lang.String module, java.lang.String msg)Debug log with module and message.- Parameters:
module- Module name.msg- Message of the error.
-
internal
public static void internal(java.lang.String msg)
Debug log with message.- Parameters:
msg- Message of the error.
-
-