public class Log
extends java.lang.Object
Log
that supports log message formatting and turning
on or off logging based on tag.Modifier and Type | Class and Description |
---|---|
static interface |
Log.Level
The list of possible of logging levels.
|
Modifier and Type | Field and Description |
---|---|
static int |
DEBUG
The level for debug log messages.
|
static int |
ERROR
The level for error log messages.
|
static int |
INFO
The level for information log messages.
|
static int |
VERBOSE
The level for verbose log messages.
|
static int |
WARN
The level for warning log messages.
|
Modifier and Type | Method and Description |
---|---|
static int |
d(java.lang.String tag,
java.lang.String message,
java.lang.Object... arguments)
Logs a debug message.
|
static int |
d(java.lang.String tag,
java.lang.String message,
java.lang.Throwable error,
java.lang.Object... arguments)
Logs a debug message.
|
static int |
e(java.lang.String tag,
java.lang.String message,
java.lang.Object... arguments)
Logs an error message.
|
static int |
e(java.lang.String tag,
java.lang.String message,
java.lang.Throwable error,
java.lang.Object... arguments)
Logs an error message.
|
static int |
i(java.lang.String tag,
java.lang.String message,
java.lang.Object... arguments)
Logs an information message.
|
static int |
i(java.lang.String tag,
java.lang.String message,
java.lang.Throwable error,
java.lang.Object... arguments)
Logs an information message.
|
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 |
v(java.lang.String tag,
java.lang.String message,
java.lang.Object... arguments)
Logs a verbose message.
|
static int |
v(java.lang.String tag,
java.lang.String message,
java.lang.Throwable error,
java.lang.Object... arguments)
Logs a verbose message.
|
static int |
w(java.lang.String tag,
java.lang.String message,
java.lang.Object... arguments)
Logs a warning message.
|
static int |
w(java.lang.String tag,
java.lang.String message,
java.lang.Throwable error,
java.lang.Object... arguments)
Logs a warning message.
|
public static final int DEBUG
public static final int ERROR
public static final int INFO
public static final int VERBOSE
public static final int WARN
public static boolean isLoggable(@NonNull java.lang.String tag, int level)
tag
- The tag to check.level
- The level to check.public static int v(@NonNull java.lang.String tag, @NonNull java.lang.String message, java.lang.Object... arguments)
tag
- the string that will ssed to identify the source of a log message. It usually
identifies the class or activity where the log call occurs.message
- the message to be logged. The message may contain formatting token supported
by String.format(String, Object...)
method.arguments
- an array of objects to be used for formatting the log message.public static int v(@NonNull java.lang.String tag, @NonNull java.lang.String message, java.lang.Throwable error, java.lang.Object... arguments)
tag
- the string that will ssed to identify the source of a log message. It usually
identifies the class or activity where the log call occurs.message
- the message to be logged. The message may contain formatting token supported
by String.format(String, Object...)
method.error
- the error to be logged, if any.arguments
- an array of objects to be used for formatting the log message.public static int d(@NonNull java.lang.String tag, @NonNull java.lang.String message, java.lang.Object... arguments)
tag
- the string that will ssed to identify the source of a log message. It usually
identifies the class or activity where the log call occurs.message
- the message to be logged. The message may contain formatting token supported
by String.format(String, Object...)
method.arguments
- an array of objects to be used for formatting the log message.public static int d(@NonNull java.lang.String tag, @NonNull java.lang.String message, java.lang.Throwable error, java.lang.Object... arguments)
tag
- the string that will ssed to identify the source of a log message. It usually
identifies the class or activity where the log call occurs.message
- the message to be logged. The message may contain formatting token supported
by String.format(String, Object...)
method.error
- the error to be logged, if any.arguments
- an array of objects to be used for formatting the log message.public static int i(@NonNull java.lang.String tag, @NonNull java.lang.String message, java.lang.Object... arguments)
tag
- the string that will ssed to identify the source of a log message. It usually
identifies the class or activity where the log call occurs.message
- the message to be logged. The message may contain formatting token supported
by String.format(String, Object...)
method.arguments
- an array of objects to be used for formatting the log message.public static int i(@NonNull java.lang.String tag, @NonNull java.lang.String message, java.lang.Throwable error, java.lang.Object... arguments)
tag
- the string that will ssed to identify the source of a log message. It usually
identifies the class or activity where the log call occurs.message
- the message to be logged. The message may contain formatting token supported
by String.format(String, Object...)
method.error
- the error to be logged, if any.arguments
- an array of objects to be used for formatting the log message.public static int w(@NonNull java.lang.String tag, @NonNull java.lang.String message, java.lang.Object... arguments)
tag
- the string that will ssed to identify the source of a log message. It usually
identifies the class or activity where the log call occurs.message
- the message to be logged. The message may contain formatting token supported
by String.format(String, Object...)
method.arguments
- an array of objects to be used for formatting the log message.public static int w(@NonNull java.lang.String tag, @NonNull java.lang.String message, java.lang.Throwable error, java.lang.Object... arguments)
tag
- the string that will ssed to identify the source of a log message. It usually
identifies the class or activity where the log call occurs.message
- the message to be logged. The message may contain formatting token supported
by String.format(String, Object...)
method.error
- the error to be logged, if any.arguments
- an array of objects to be used for formatting the log message.public static int e(@NonNull java.lang.String tag, @NonNull java.lang.String message, java.lang.Object... arguments)
tag
- the string that will ssed to identify the source of a log message. It usually
identifies the class or activity where the log call occurs.message
- the message to be logged. The message may contain formatting token supported
by String.format(String, Object...)
method.arguments
- an array of objects to be used for formatting the log message.public static int e(@NonNull java.lang.String tag, @NonNull java.lang.String message, java.lang.Throwable error, java.lang.Object... arguments)
tag
- the string that will ssed to identify the source of a log message. It usually
identifies the class or activity where the log call occurs.message
- the message to be logged. The message may contain formatting token supported
by String.format(String, Object...)
method.error
- the error to be logged, if any.arguments
- an array of objects to be used for formatting the log message.