public interface ILogger
Typical usage pattern:
import org.snf4j.core.logger.ILogger;
import org.snf4j.core.logger.LoggerFactory;
class Foo {
private ILogger log = LoggerFactory.getLogger(Foo.class);
Foo(int arg1, Object arg2) {
log.debug("Foo created with args: {} {}", arg1, arg2);
}
}
| Modifier and Type | Method and Description |
|---|---|
void |
debug(String msg)
Logs a message at the DEBUG level.
|
void |
debug(String msg,
Object... args)
Logs a message at the DEBUG level with three or more arguments.
|
void |
debug(String msg,
Object arg)
Logs a message at the DEBUG level with one argument.
|
void |
debug(String msg,
Object arg1,
Object arg2)
Logs a message at the DEBUG level with two arguments.
|
void |
error(String msg)
Logs a message at the ERROR level.
|
void |
error(String msg,
Object... args)
Logs a message at the ERROR level with three or more arguments.
|
void |
error(String msg,
Object arg)
Logs a message at the ERROR level with one argument.
|
void |
error(String msg,
Object arg1,
Object arg2)
Logs a message at the ERROR level with two arguments.
|
void |
info(String msg)
Logs a message at the INFO level.
|
void |
info(String msg,
Object... args)
Logs a message at the INFO level with three or more arguments.
|
void |
info(String msg,
Object arg)
Logs a message at the INFO level with one argument.
|
void |
info(String msg,
Object arg1,
Object arg2)
Logs a message at the INFO level with two arguments.
|
boolean |
isDebugEnabled()
Tells if the logger is enabled for the DEBUG level.
|
boolean |
isTraceEnabled()
Tells if the logger is enabled for the TRACE level.
|
void |
trace(String msg)
Logs a message at the TRACE level.
|
void |
trace(String msg,
Object... args)
Logs a message at the TRACE level with three or more arguments.
|
void |
trace(String msg,
Object arg)
Logs a message at the TRACE level with one argument.
|
void |
trace(String msg,
Object arg1,
Object arg2)
Logs a message at the TRACE level with two arguments.
|
void |
warn(String msg)
Logs a message at the WARN level.
|
void |
warn(String msg,
Object... args)
Logs a message at the WARN level with three or more arguments.
|
void |
warn(String msg,
Object arg)
Logs a message at the WARN level with one argument.
|
void |
warn(String msg,
Object arg1,
Object arg2)
Logs a message at the WARN level with two arguments.
|
boolean isDebugEnabled()
true if the logger is enabled for the DEBUG levelboolean isTraceEnabled()
true if the logger is enabled for the TRACE levelvoid debug(String msg)
msg - the message to be loggedvoid debug(String msg, Object arg)
msg - a pattern of the message to be logged that uses the
{} characters to indicate the place for the
appropriate argumentarg - the argumentvoid debug(String msg, Object arg1, Object arg2)
msg - a pattern of the message to be logged that uses the
{} characters to indicate the place for the
appropriate argumentarg1 - the first argumentarg2 - the second argumentvoid debug(String msg, Object... args)
msg - a pattern of the message to be logged that uses the
{} characters to indicate the place for the
appropriate argumentargs - the argumentsvoid trace(String msg)
msg - the message to be loggedvoid trace(String msg, Object arg)
msg - a pattern of the message to be logged that uses the
{} characters to indicate the place for the
appropriate argumentarg - the argumentvoid trace(String msg, Object arg1, Object arg2)
msg - a pattern of the message to be logged that uses the
{} characters to indicate the place for the
appropriate argumentarg1 - the first argumentarg2 - the second argumentvoid trace(String msg, Object... args)
msg - a pattern of the message to be logged that uses the
{} characters to indicate the place for the
appropriate argumentargs - the argumentsvoid warn(String msg)
msg - the message to be loggedvoid warn(String msg, Object arg)
msg - a pattern of the message to be logged that uses the
{} characters to indicate the place for the
appropriate argumentarg - the argumentvoid warn(String msg, Object arg1, Object arg2)
msg - a pattern of the message to be logged that uses the
{} characters to indicate the place for the
appropriate argumentarg1 - the first argumentarg2 - the second argumentvoid warn(String msg, Object... args)
msg - a pattern of the message to be logged that uses the
{} characters to indicate the place for the
appropriate argumentargs - the argumentsvoid error(String msg)
msg - the message to be loggedvoid error(String msg, Object arg)
msg - a pattern of the message to be logged that uses the
{} characters to indicate the place for the
appropriate argumentarg - the argumentvoid error(String msg, Object arg1, Object arg2)
msg - a pattern of the message to be logged that uses the
{} characters to indicate the place for the
appropriate argumentarg1 - the first argumentarg2 - the second argumentvoid error(String msg, Object... args)
msg - a pattern of the message to be logged that uses the
{} characters to indicate the place for the
appropriate argumentargs - the argumentsvoid info(String msg)
msg - the message to be loggedvoid info(String msg, Object arg)
msg - a pattern of the message to be logged that uses the
{} characters to indicate the place for the
appropriate argumentarg - the argumentvoid info(String msg, Object arg1, Object arg2)
msg - a pattern of the message to be logged that uses the
{} characters to indicate the place for the
appropriate argumentarg1 - the first argumentarg2 - the second argumentCopyright © 2017–2022 SNF4J.ORG. All rights reserved.