public class Log extends Object
| Modifier and Type | Field and Description |
|---|---|
static OutputChannel |
SYSTEM_OUT
OutputChannel implementation based on System.out.
|
| Constructor and Description |
|---|
Log(OutputChannel outputChannel)
Creates a new instance of the class using defaults
|
Log(OutputChannel outputChannel,
LogLevel currentLogLevel,
String tag)
Creates a new instance of the class
|
| Modifier and Type | Method and Description |
|---|---|
void |
assrt(String message)
Assert level logging
|
void |
assrt(String template,
Object... args)
Assert level logging in a parameterized string
|
void |
debug(String message)
Debug logging
|
void |
debug(String template,
Object... args)
Debug level logging in a parameterized string
|
void |
error(String message)
Error level logging
|
void |
error(String template,
Object... args)
Error level logging in a parameterized string
|
void |
exception(Throwable e)
Logs an exception
|
void |
exception(Throwable e,
String template,
Object... args) |
void |
info(String message)
Information level logging
|
void |
info(String template,
Object... args)
Information level logging in a parameterized string
|
void |
log(LogLevel logLevel,
String message)
Basic logging function with a single string message
|
void |
log(LogLevel logLevel,
String template,
Object... args)
Parameterized versions of the logging functions
|
void |
setCurrentLogLevel(LogLevel logLevel)
Sets the current logging level
|
void |
setPackagePrefix()
Sets the tag with the package name prefix
|
void |
verbose(String message)
Verbose logging
|
void |
verbose(String template,
Object... args)
Verbose level logging in a parameterized string
|
void |
warn(String message)
Warning level logging
|
void |
warn(String template,
Object... args)
Warning level logging in a parameterized string
|
public static final OutputChannel SYSTEM_OUT
public Log(@NonNull
OutputChannel outputChannel)
outputChannel - An interface to OutputChannel to uze for messages.public Log(@NonNull
OutputChannel outputChannel,
LogLevel currentLogLevel,
@NonNull
String tag)
outputChannel - An interface to OutputChannel to uze for messages.currentLogLevel - Current log level for loggingtag - Base tag to use for messagespublic void setCurrentLogLevel(LogLevel logLevel)
logLevel - Log level to filterpublic void setPackagePrefix()
public void log(LogLevel logLevel, String message)
logLevel - Log levelmessage - Message to logpublic void log(LogLevel logLevel, String template, Object... args)
logLevel - Log leveltemplate - String templateargs - Argumentspublic void verbose(String message)
message - Message to logpublic void verbose(String template, Object... args)
template - Parameterized stringargs - Argumentspublic void debug(String message)
message - Message to logpublic void debug(String template, Object... args)
template - Parameterized stringargs - Argumentspublic void info(String message)
message - Message to logpublic void info(String template, Object... args)
template - Parameterized stringargs - Argumentspublic void warn(String message)
message - Message to logpublic void warn(String template, Object... args)
template - Parameterized stringargs - Argumentspublic void error(String message)
message - Message to logpublic void error(String template, Object... args)
template - Parameterized stringargs - Argumentspublic void assrt(String message)
message - Message to logpublic void assrt(String template, Object... args)
template - Parameterized stringargs - Argumentspublic void exception(Throwable e)
e - Exception to logCopyright © 2019. All rights reserved.