public final class Logger extends 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(String tag,
String msg)
Send a debug log message.
|
static void |
d(String tag,
String msg,
Throwable tr)
Send a debug log message and log the exception.
|
static void |
e(String tag,
String msg)
Send an error log message.
|
static void |
e(String tag,
String msg,
Throwable tr)
Send an error log message and log the exception.
|
static void |
i(String tag,
String msg)
Send an info log message.
|
static void |
i(String tag,
String msg,
Throwable tr)
Send an info log message and log the exception.
|
static void |
log(int severity,
String tag,
String message)
Send a log message based on severity.
|
static void |
setLoggerDefinition(LoggerDefinition loggerDefinition)
Replace the current used logger definition.
|
static void |
v(String tag,
String msg)
Send a verbose log message.
|
static void |
v(String tag,
String msg,
Throwable tr)
Send a verbose log message and log the exception.
|
static void |
w(String tag,
String msg)
Send a warning log message.
|
static void |
w(String tag,
String msg,
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(String tag, 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(String tag, String msg, 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(String tag, 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(String tag, String msg, 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(String tag, 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(String tag, String msg, 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(String tag, 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(String tag, String msg, 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(String tag, 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(String tag, String msg, 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, String tag, 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.© 2015–2018 Mapbox. All rights reserved.