@Deprecated public class SimpleLogger extends Object implements Logger
A simple implementation of Logger which delegates all its calls to Log class.
Logger.Level| Constructor and Description |
|---|
SimpleLogger(int level)
Deprecated.
Creates a new instance of SimpleLogger with the specified log level.
|
| Modifier and Type | Method and Description |
|---|---|
void |
d(String tag,
String msg)
Deprecated.
Delegates to
Log.d(String, String) if Log.DEBUG level is loggable at the time. |
void |
d(String tag,
String msg,
Throwable tr)
Deprecated.
Delegates to
Log.d(String, String, Throwable) if Log.DEBUG level is loggable
at the time. |
void |
e(String tag,
String msg)
Deprecated.
Delegates to
Log.e(String, String) if Log.ERROR level is loggable at the time. |
void |
e(String tag,
String msg,
Throwable tr)
Deprecated.
Delegates to
Log.e(String, String, Throwable) if Log.ERROR level is loggable
at the time. |
void |
forceLog(int level,
String tag,
String msg)
Deprecated.
Delegates to
Log.println(int, String, String) with the specified parameters. |
int |
getLogLevel()
Deprecated.
Returns the logging level specified for this logger.
|
String |
getStackTraceString(Throwable tr)
Deprecated.
Delegates to
Log.getStackTraceString(Throwable). |
void |
i(String tag,
String msg)
Deprecated.
Delegates to
Log.i(String, String) if Log.INFO level is loggable at the time. |
void |
i(String tag,
String msg,
Throwable tr)
Deprecated.
Delegates to
Log.i(String, String, Throwable) if Log.INFO level is loggable
at the time. |
boolean |
isLoggable(String tag,
int level)
Deprecated.
Checks whether a log output for the specified level may be logged or not.
|
void |
log(int level,
String tag,
String msg)
Deprecated.
Delegates to
Logger.forceLog(int, String, String) if the specified level is
loggable at the time. |
void |
setLogLevel(int level)
Deprecated.
Sets a logging level for this logger.
|
void |
v(String tag,
String msg)
Deprecated.
Delegates to
Log.v(String, String) if Log.VERBOSE level is loggable at the time. |
void |
v(String tag,
String msg,
Throwable tr)
Deprecated.
Delegates to
Log.v(String, String, Throwable) if Log.VERBOSE level is loggable
at the time. |
void |
w(String tag,
String msg)
Deprecated.
Delegates to
Log.w(String, String) if Log.WARN level is loggable at the time. |
void |
w(String tag,
String msg,
Throwable tr)
Deprecated.
Delegates to
Log.w(String, String, Throwable) if Log.WARN level is loggable
at the time. |
void |
w(String tag,
Throwable tr)
Deprecated.
Delegates to
Log.w(String, Throwable) if Log.WARN level is loggable at the time. |
void |
wtf(String tag,
String msg)
Deprecated.
Delegates to
Log.wtf(String, String). |
void |
wtf(String tag,
String msg,
Throwable tr)
Deprecated.
Delegates to
Log.wtf(String, String, Throwable). |
void |
wtf(String tag,
Throwable tr)
Deprecated.
Delegates to
Log.wtf(String, Throwable). |
public SimpleLogger(int level)
level - The initial logging level for the logger.setLogLevel(int),
getLogLevel()public void setLogLevel(int level)
LoggersetLogLevel in interface Loggerlevel - The desired log level. Should be one of log levels defined in Log class.Logger.getLogLevel(),
Logger.isLoggable(String, int)public int getLogLevel()
LoggergetLogLevel in interface LoggerLogger.setLogLevel(int),
Logger.isLoggable(String, int)public boolean isLoggable(String tag, int level)
LoggerisLoggable in interface LoggerTrue if the specified level is loggable, false otherwise.public void d(String tag, String msg)
LoggerLog.d(String, String) if Log.DEBUG level is loggable at the time.public void d(String tag, String msg, Throwable tr)
LoggerLog.d(String, String, Throwable) if Log.DEBUG level is loggable
at the time.public void v(String tag, String msg)
LoggerLog.v(String, String) if Log.VERBOSE level is loggable at the time.public void v(String tag, String msg, Throwable tr)
LoggerLog.v(String, String, Throwable) if Log.VERBOSE level is loggable
at the time.public void i(String tag, String msg)
LoggerLog.i(String, String) if Log.INFO level is loggable at the time.public void i(String tag, String msg, Throwable tr)
LoggerLog.i(String, String, Throwable) if Log.INFO level is loggable
at the time.public void w(String tag, String msg)
LoggerLog.w(String, String) if Log.WARN level is loggable at the time.public void w(String tag, Throwable tr)
LoggerLog.w(String, Throwable) if Log.WARN level is loggable at the time.public void w(String tag, String msg, Throwable tr)
LoggerLog.w(String, String, Throwable) if Log.WARN level is loggable
at the time.public void e(String tag, String msg)
LoggerLog.e(String, String) if Log.ERROR level is loggable at the time.public void e(String tag, String msg, Throwable tr)
LoggerLog.e(String, String, Throwable) if Log.ERROR level is loggable
at the time.public void wtf(String tag, String msg)
LoggerLog.wtf(String, String).public void wtf(String tag, Throwable tr)
LoggerLog.wtf(String, Throwable).public void wtf(String tag, String msg, Throwable tr)
LoggerLog.wtf(String, String, Throwable).public void log(int level,
String tag,
String msg)
LoggerLogger.forceLog(int, String, String) if the specified level is
loggable at the time.public void forceLog(int level,
String tag,
String msg)
LoggerLog.println(int, String, String) with the specified parameters.public String getStackTraceString(Throwable tr)
LoggerLog.getStackTraceString(Throwable).getStackTraceString in interface Logger