public class Log
extends java.lang.Object
Log is an object that can be used for logging instead of Android's android.util.Log| Constructor and Description |
|---|
Log() |
| Modifier and Type | Method and Description |
|---|---|
static int |
d(java.lang.String tag,
java.lang.String message)
Send a
#DEBUG log message. |
static int |
d(java.lang.String tag,
java.lang.String message,
java.lang.Throwable throwable)
Send a
#DEBUG log message and log the exception. |
static int |
e(java.lang.String tag,
java.lang.String message)
Send an
#ERROR log message. |
static int |
e(java.lang.String tag,
java.lang.String message,
java.lang.Throwable throwable)
Send a
#ERROR log message and log the exception. |
static java.lang.String |
getStackTraceString(java.lang.Throwable throwable)
Handy function to get a loggable stack trace from a
Throwable |
static int |
i(java.lang.String tag,
java.lang.String message)
Send an
#INFO log message. |
static int |
i(java.lang.String tag,
java.lang.String message,
java.lang.Throwable throwable)
Send a
#INFO log message and log the exception. |
static boolean |
isEnabled() |
static boolean |
isLoggable(java.lang.String tag,
int level)
Checks to see whether or not a log for the specified tag is loggable at the specified level.
|
static int |
println(int priority,
java.lang.String tag,
java.lang.String message)
Low-level logging call.
|
static void |
setDelegate(LogDelegate delegate) |
static void |
setEnabled(boolean enabled) |
static int |
v(java.lang.String tag,
java.lang.String message)
Send a
#VERBOSE log message. |
static int |
v(java.lang.String tag,
java.lang.String message,
java.lang.Throwable throwable)
Send a
#VERBOSE log message and log the exception. |
static int |
w(java.lang.String tag,
java.lang.String message)
Send a
#WARN log message. |
static int |
w(java.lang.String tag,
java.lang.String message,
java.lang.Throwable throwable)
Send a
#WARN log message and log the exception. |
static int |
w(java.lang.String tag,
java.lang.Throwable throwable) |
static int |
wtf(java.lang.String tag,
java.lang.String message)
What a Terrible Failure: Report a condition that should never happen.
|
static int |
wtf(java.lang.String tag,
java.lang.String message,
java.lang.Throwable throwable)
What a Terrible Failure: Report an exception that should never happen.
|
static int |
wtf(java.lang.String tag,
java.lang.Throwable throwable)
What a Terrible Failure: Report an exception that should never happen.
|
public static void setDelegate(LogDelegate delegate)
public static boolean isEnabled()
public static void setEnabled(boolean enabled)
public static int v(java.lang.String tag,
java.lang.String message)
#VERBOSE log message.tag - Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.message - The message you would like logged.public static int v(java.lang.String tag,
java.lang.String message,
java.lang.Throwable throwable)
#VERBOSE log message and log the exception.tag - Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.message - The message you would like logged.throwable - An exception to logpublic static int d(java.lang.String tag,
java.lang.String message)
#DEBUG log message.tag - Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.message - The message you would like logged.public static int d(java.lang.String tag,
java.lang.String message,
java.lang.Throwable throwable)
#DEBUG log message and log the exception.tag - Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.message - The message you would like logged.throwable - An exception to logpublic static int i(java.lang.String tag,
java.lang.String message)
#INFO log message.tag - Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.message - The message you would like logged.public static int i(java.lang.String tag,
java.lang.String message,
java.lang.Throwable throwable)
#INFO log message and log the exception.tag - Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.message - The message you would like logged.throwable - An exception to logpublic static int w(java.lang.String tag,
java.lang.String message)
#WARN log message.tag - Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.message - The message you would like logged.public static int w(java.lang.String tag,
java.lang.String message,
java.lang.Throwable throwable)
#WARN log message and log the exception.tag - Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.message - The message you would like logged.throwable - An exception to logpublic static boolean isLoggable(java.lang.String tag,
int level)
tag - The tag to check.level - The level to check.java.lang.IllegalArgumentException - is thrown if the tag.length() > 23.public static int w(java.lang.String tag,
java.lang.Throwable throwable)
public static int e(java.lang.String tag,
java.lang.String message)
#ERROR log message.tag - Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.message - The message you would like logged.public static int e(java.lang.String tag,
java.lang.String message,
java.lang.Throwable throwable)
#ERROR log message and log the exception.tag - Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.message - The message you would like logged.throwable - An exception to logpublic static int wtf(java.lang.String tag,
java.lang.String message)
tag - Used to identify the source of a log message.message - The message you would like logged.public static int wtf(java.lang.String tag,
java.lang.Throwable throwable)
wtf(String, String), with an exception to log.tag - Used to identify the source of a log message.throwable - An exception to log.public static int wtf(java.lang.String tag,
java.lang.String message,
java.lang.Throwable throwable)
wtf(String, Throwable), with a message as well.tag - Used to identify the source of a log message.message - The message you would like logged.throwable - A Throwable to log. May be null.public static java.lang.String getStackTraceString(java.lang.Throwable throwable)
Throwablethrowable - An exception to logpublic static int println(int priority,
java.lang.String tag,
java.lang.String message)
priority - The priority/type of this log messagetag - Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.message - The message you would like logged.