public final class Logger
extends java.lang.Object
Default implementation relies on Log
.
Alternative implementations can be set with setLoggerDefinition(LoggerDefinition)
.
Constructor and Description |
---|
Logger() |
Modifier and Type | Method and Description |
---|---|
static void |
d(java.lang.String tag,
java.lang.String msg)
Send a debug log message.
|
static void |
d(java.lang.String tag,
java.lang.String msg,
java.lang.Throwable tr)
Send a debug log message and log the exception.
|
static void |
e(java.lang.String tag,
java.lang.String msg)
Send an error log message.
|
static void |
e(java.lang.String tag,
java.lang.String msg,
java.lang.Throwable tr)
Send an error log message and log the exception.
|
static void |
i(java.lang.String tag,
java.lang.String msg)
Send an info log message.
|
static void |
i(java.lang.String tag,
java.lang.String msg,
java.lang.Throwable tr)
Send an info log message and log the exception.
|
static void |
log(int severity,
java.lang.String tag,
java.lang.String message)
Send a log message based on severity.
|
static void |
setLoggerDefinition(LoggerDefinition loggerDefinition)
Replace the current used logger definition.
|
static void |
v(java.lang.String tag,
java.lang.String msg)
Send a verbose log message.
|
static void |
v(java.lang.String tag,
java.lang.String msg,
java.lang.Throwable tr)
Send a verbose log message and log the exception.
|
static void |
w(java.lang.String tag,
java.lang.String msg)
Send a warning log message.
|
static void |
w(java.lang.String tag,
java.lang.String msg,
java.lang.Throwable tr)
Send a warning log message and log the exception.
|
public static void setLoggerDefinition(LoggerDefinition loggerDefinition)
loggerDefinition
- the definition of the loggerpublic static void v(java.lang.String tag, java.lang.String msg)
tag
- Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.msg
- The message you would like logged.public static void v(java.lang.String tag, java.lang.String msg, java.lang.Throwable tr)
tag
- Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.msg
- The message you would like logged.tr
- An exception to logpublic static void d(java.lang.String tag, java.lang.String msg)
tag
- Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.msg
- The message you would like logged.public static void d(java.lang.String tag, java.lang.String msg, java.lang.Throwable tr)
tag
- Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.msg
- The message you would like logged.tr
- An exception to logpublic static void i(java.lang.String tag, java.lang.String msg)
tag
- Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.msg
- The message you would like logged.public static void i(java.lang.String tag, java.lang.String msg, java.lang.Throwable tr)
tag
- Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.msg
- The message you would like logged.tr
- An exception to logpublic static void w(java.lang.String tag, java.lang.String msg)
tag
- Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.msg
- The message you would like logged.public static void w(java.lang.String tag, java.lang.String msg, java.lang.Throwable tr)
tag
- Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.msg
- The message you would like logged.tr
- An exception to logpublic static void e(java.lang.String tag, java.lang.String msg)
tag
- Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.msg
- The message you would like logged.public static void e(java.lang.String tag, java.lang.String msg, java.lang.Throwable tr)
tag
- Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.msg
- The message you would like logged.tr
- An exception to logpublic static void log(int severity, java.lang.String tag, java.lang.String message)
severity
- the log severitytag
- 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.