public static class Logging.Logger
extends java.lang.Object
Constructor and Description |
---|
Logger(Logging.LoggingConfig config)
Creates a new Logger using a
Logging.LoggingConfig . |
Modifier and Type | Method and Description |
---|---|
boolean |
delete()
Deletes the log File as specified in the
Logging.LoggingConfig . |
void |
e(java.lang.String tag,
java.lang.String msg)
Adds a new log entry with log level ERROR to the log file.
|
Logging.LoggingConfig |
getLoggingConfig()
Returns the used
Logging.LoggingConfig . |
void |
i(java.lang.String tag,
java.lang.String msg)
Adds a new log entry with log level INFO to the log file.
|
void |
setLoggingConfig(Logging.LoggingConfig config)
Sets the
Logging.LoggingConfig . |
void |
w(java.lang.String tag,
java.lang.String msg)
Adds a new log entry with log level WARN to the log file.
|
public Logger(Logging.LoggingConfig config)
Logging.LoggingConfig
.config
- The Logging.LoggingConfig
to use.public void setLoggingConfig(Logging.LoggingConfig config)
Logging.LoggingConfig
.config
- The Logging.LoggingConfig
to set.public Logging.LoggingConfig getLoggingConfig()
Logging.LoggingConfig
.Logging.LoggingConfig
.public boolean delete()
Logging.LoggingConfig
.true
if and only if the file is successfully deleted,
otherwise false
.public void i(java.lang.String tag, java.lang.String msg)
Logging.LoggingConfig
.tag
- The log tag to use. Should represent the application's
name and/or a component of it.msg
- The log message.public void w(java.lang.String tag, java.lang.String msg)
Logging.LoggingConfig
.tag
- The log tag to use. Should represent the application's
name and/or a component of it.msg
- The log message.public void e(java.lang.String tag, java.lang.String msg)
Logging.LoggingConfig
.tag
- The log tag to use. Should represent the application's
name and/or a component of it.msg
- The log message.