public class Logger
extends java.lang.Object
| Constructor and Description |
|---|
Logger(LogLevel logLevel)
Creates a new logger, which uses a specific log level.
|
| Modifier and Type | Method and Description |
|---|---|
LogLevel |
getLogLevel()
Returns the current log level.
|
void |
logDebug(java.lang.Class<?> tag,
java.lang.String message)
Logs a specific message on the log level DEBUG.
|
void |
logDebug(java.lang.Class<?> tag,
java.lang.String message,
java.lang.Throwable cause)
Logs a specific message and exception on the log level DEBUG.
|
void |
logError(java.lang.Class<?> tag,
java.lang.String message)
Logs a specific message on the log level ERROR.
|
void |
logError(java.lang.Class<?> tag,
java.lang.String message,
java.lang.Throwable cause)
Logs a specific message and exception on the log level ERROR.
|
void |
logInfo(java.lang.Class<?> tag,
java.lang.String message)
Logs a specific message on the log level INFO.
|
void |
logInfo(java.lang.Class<?> tag,
java.lang.String message,
java.lang.Throwable cause)
Logs a specific message and exception on the log level INFO.
|
void |
logVerbose(java.lang.Class<?> tag,
java.lang.String message)
Logs a specific message on the log level VERBOSE.
|
void |
logVerbose(java.lang.Class<?> tag,
java.lang.String message,
java.lang.Throwable cause)
Logs a specific message and exception on the log level VERBOSE.
|
void |
logWarn(java.lang.Class<?> tag,
java.lang.String message)
Logs a specific message on the log level WARN.
|
void |
logWarn(java.lang.Class<?> tag,
java.lang.String message,
java.lang.Throwable cause)
Logs a specific message and exception on the log level WARN.
|
void |
setLogLevel(LogLevel logLevel)
Sets the log level.
|
public final LogLevel getLogLevel()
LogLevel. The log level may
either be ALL, DEBUG, INFO, WARN,
ERROR or OFFpublic final void setLogLevel(LogLevel logLevel)
logLevel - The log level, which should be set, as a value of the enum LogLevel. The log
level may not be nullpublic final void logVerbose(java.lang.Class<?> tag,
java.lang.String message)
tag - The tag, which identifies the source of the log message, as an instance of the class
Class. The tag may not be nullmessage - The message, which should be logged, as a String. The message may neither be
null, nor emptypublic final void logVerbose(java.lang.Class<?> tag,
java.lang.String message,
java.lang.Throwable cause)
tag - The tag, which identifies the source of the log message, as an instance of the class
Class. The tag may not be nullmessage - The message, which should be logged, as a String. The message may neither be
null, nor emptycause - The exception, which caused the log message, as an instance of the class Throwable. The cause may not be nullpublic final void logDebug(java.lang.Class<?> tag,
java.lang.String message)
tag - The tag, which identifies the source of the log message, as an instance of the class
Class. The tag may not be nullmessage - The message, which should be logged, as a String. The message may neither be
null, nor emptypublic final void logDebug(java.lang.Class<?> tag,
java.lang.String message,
java.lang.Throwable cause)
tag - The tag, which identifies the source of the log message, as an instance of the class
Class. The tag may not be nullmessage - The message, which should be logged, as a String. The message may neither be
null, nor emptycause - The exception, which caused the log message, as an instance of the class Throwable. The cause may not be nullpublic final void logInfo(java.lang.Class<?> tag,
java.lang.String message)
tag - The tag, which identifies the source of the log message, as an instance of the class
Class. The tag may not be nullmessage - The message, which should be logged, as a String. The message may neither be
null, nor emptypublic final void logInfo(java.lang.Class<?> tag,
java.lang.String message,
java.lang.Throwable cause)
tag - The tag, which identifies the source of the log message, as an instance of the class
Class. The tag may not be nullmessage - The message, which should be logged, as a String. The message may neither be
null, nor emptycause - The exception, which caused the log message, as an instance of the class Throwable. The cause may not be nullpublic final void logWarn(java.lang.Class<?> tag,
java.lang.String message)
tag - The tag, which identifies the source of the log message, as an instance of the class
Class. The tag may not be nullmessage - The message, which should be logged, as a String. The message may neither be
null, nor emptypublic final void logWarn(java.lang.Class<?> tag,
java.lang.String message,
java.lang.Throwable cause)
tag - The tag, which identifies the source of the log message, as an instance of the class
Class. The tag may not be nullmessage - The message, which should be logged, as a String. The message may neither be
null, nor emptycause - The exception, which caused the log message, as an instance of the class Throwable. The cause may not be nullpublic final void logError(java.lang.Class<?> tag,
java.lang.String message)
tag - The tag, which identifies the source of the log message, as an instance of the class
Class. The tag may not be nullmessage - The message, which should be logged, as a String. The message may neither be
null, nor emptypublic final void logError(java.lang.Class<?> tag,
java.lang.String message,
java.lang.Throwable cause)
tag - The tag, which identifies the source of the log message, as an instance of the class
Class. The tag may not be nullmessage - The message, which should be logged, as a String. The message may neither be
null, nor emptycause - The exception, which caused the log message, as an instance of the class Throwable. The cause may not be null