public class Logger extends Object implements org.slf4j.Logger
Logger
that adds a set of methods called log that take an instance of Level as
the first argument and delegate to the appropriate method on the SLF4J Logger (info for INFO, etc).
All methods defined by the SLF4J Logger
interface delegate directly to the decorated SLF4J
Logger
.Constructor and Description |
---|
Logger(org.slf4j.Logger decorated)
Returns a new Logger that decorates the provided SLF4J
Logger . |
Modifier and Type | Method and Description |
---|---|
void |
debug(org.slf4j.Marker marker,
String msg) |
void |
debug(org.slf4j.Marker marker,
String format,
Object... arguments) |
void |
debug(org.slf4j.Marker marker,
String format,
Object arg) |
void |
debug(org.slf4j.Marker marker,
String format,
Object arg1,
Object arg2) |
void |
debug(org.slf4j.Marker marker,
String msg,
Throwable throwable) |
void |
debug(String msg) |
void |
debug(String format,
Object... arguments) |
void |
debug(String format,
Object arg) |
void |
debug(String format,
Object arg1,
Object arg2) |
void |
debug(String msg,
Throwable throwable) |
void |
error(org.slf4j.Marker marker,
String msg) |
void |
error(org.slf4j.Marker marker,
String format,
Object... arguments) |
void |
error(org.slf4j.Marker marker,
String format,
Object arg) |
void |
error(org.slf4j.Marker marker,
String format,
Object arg1,
Object arg2) |
void |
error(org.slf4j.Marker marker,
String msg,
Throwable throwable) |
void |
error(String msg) |
void |
error(String format,
Object... arguments) |
void |
error(String format,
Object arg) |
void |
error(String format,
Object arg1,
Object arg2) |
void |
error(String msg,
Throwable throwable) |
String |
getName() |
void |
info(org.slf4j.Marker marker,
String msg) |
void |
info(org.slf4j.Marker marker,
String format,
Object... arguments) |
void |
info(org.slf4j.Marker marker,
String format,
Object arg) |
void |
info(org.slf4j.Marker marker,
String format,
Object arg1,
Object arg2) |
void |
info(org.slf4j.Marker marker,
String msg,
Throwable throwable) |
void |
info(String msg) |
void |
info(String format,
Object... arguments) |
void |
info(String format,
Object arg) |
void |
info(String format,
Object arg1,
Object arg2) |
void |
info(String msg,
Throwable throwable) |
boolean |
isDebugEnabled() |
boolean |
isDebugEnabled(org.slf4j.Marker marker) |
boolean |
isEnabled(Level level)
Is the logger instance enabled for a given level?
Delegates to the appropriate method for the level - for instance, if the provided level is
Level.DEBUG , this
method will delegate to Logger.isDebugEnabled() on the decorated logger. |
boolean |
isEnabled(Level level,
org.slf4j.Marker marker)
Similar to
isTraceEnabled() method except that the
marker data is also taken into account. |
boolean |
isErrorEnabled() |
boolean |
isErrorEnabled(org.slf4j.Marker marker) |
boolean |
isInfoEnabled() |
boolean |
isInfoEnabled(org.slf4j.Marker marker) |
boolean |
isTraceEnabled() |
boolean |
isTraceEnabled(org.slf4j.Marker marker) |
boolean |
isWarnEnabled() |
boolean |
isWarnEnabled(org.slf4j.Marker marker) |
void |
log(Level level,
org.slf4j.Marker marker,
String msg)
Delegates to the appropriate logging method for the level.
|
void |
log(Level level,
org.slf4j.Marker marker,
String format,
Object... arguments)
Delegates to the appropriate logging method for the level.
|
void |
log(Level level,
org.slf4j.Marker marker,
String format,
Object arg)
Delegates to the appropriate logging method for the level.
|
void |
log(Level level,
org.slf4j.Marker marker,
String format,
Object arg1,
Object arg2)
Delegates to the appropriate logging method for the level.
|
void |
log(Level level,
org.slf4j.Marker marker,
String msg,
Throwable throwable)
Delegates to the appropriate logging method for the level.
|
void |
log(Level level,
String msg)
Delegates to the appropriate logging method for the level.
|
void |
log(Level level,
String format,
Object... arguments)
Delegates to the appropriate logging method for the level.
|
void |
log(Level level,
String format,
Object arg)
Delegates to the appropriate logging method for the level.
|
void |
log(Level level,
String format,
Object arg1,
Object arg2)
Delegates to the appropriate logging method for the level.
|
void |
log(Level level,
String msg,
Throwable throwable)
Delegates to the appropriate logging method for the level.
|
void |
trace(org.slf4j.Marker marker,
String msg) |
void |
trace(org.slf4j.Marker marker,
String format,
Object... arguments) |
void |
trace(org.slf4j.Marker marker,
String format,
Object arg) |
void |
trace(org.slf4j.Marker marker,
String format,
Object arg1,
Object arg2) |
void |
trace(org.slf4j.Marker marker,
String msg,
Throwable throwable) |
void |
trace(String msg) |
void |
trace(String format,
Object... arguments) |
void |
trace(String format,
Object arg) |
void |
trace(String format,
Object arg1,
Object arg2) |
void |
trace(String msg,
Throwable throwable) |
void |
warn(org.slf4j.Marker marker,
String msg) |
void |
warn(org.slf4j.Marker marker,
String format,
Object... arguments) |
void |
warn(org.slf4j.Marker marker,
String format,
Object arg) |
void |
warn(org.slf4j.Marker marker,
String format,
Object arg1,
Object arg2) |
void |
warn(org.slf4j.Marker marker,
String msg,
Throwable throwable) |
void |
warn(String msg) |
void |
warn(String format,
Object... arguments) |
void |
warn(String format,
Object arg) |
void |
warn(String format,
Object arg1,
Object arg2) |
void |
warn(String msg,
Throwable throwable) |
public Logger(org.slf4j.Logger decorated)
Logger
.
It is generally more convenient to call LoggerFactory.getLogger(Class)
or LoggerFactory.getLogger(String)
.decorated
- the SLF4J Logger
to which all logging calls will be delegatedpublic boolean isEnabled(Level level)
Level.DEBUG
, this
method will delegate to Logger.isDebugEnabled()
on the decorated logger.level
- the level that may or may not be enabledpublic void log(Level level, String msg)
Level.DEBUG
, this method will delegate to
Logger.debug(String)
on the decorated logger.level
- the level at which to logmsg
- the message string to be loggedpublic void log(Level level, String format, Object arg)
Level.DEBUG
, this method will delegate to
Logger.debug(String, Object)
on the decorated logger.level
- the level at which to logformat
- the format stringarg
- the argumentpublic void log(Level level, String format, Object arg1, Object arg2)
Level.DEBUG
, this method will delegate to
Logger.debug(String, Object, Object)
on the decorated logger.level
- the level at which to logformat
- the format stringarg1
- the first argumentarg2
- the second argumentpublic void log(Level level, String format, Object... arguments)
Level.DEBUG
, this method will delegate to
Logger.debug(String, Object...)
on the decorated logger.level
- the level at which to logformat
- the format stringarguments
- a list of 3 or more argumentspublic void log(Level level, String msg, Throwable throwable)
Level.DEBUG
, this method will delegate to
Logger.debug(String, Throwable)
on the decorated logger.level
- the level at which to logmsg
- the message string to be loggedthrowable
- the exception (throwable) to logpublic boolean isEnabled(Level level, org.slf4j.Marker marker)
isTraceEnabled()
method except that the
marker data is also taken into account.
Delegates to the appropriate method for the level - for instance, if the provided level is Level.DEBUG
, this
method will delegate to Logger.isDebugEnabled(Marker)
on the decorated logger.level
- the level that may or may not be enabledmarker
- The marker data to take into considerationpublic void log(Level level, org.slf4j.Marker marker, String msg)
Level.DEBUG
, this method will delegate to
Logger.debug(Marker, String)
on the decorated logger.level
- the level at which to logmarker
- The marker data to take into considerationmsg
- the message string to be loggedpublic void log(Level level, org.slf4j.Marker marker, String format, Object arg)
Level.DEBUG
, this method will delegate to
Logger.debug(String, Object)
on the decorated logger.level
- the level at which to logmarker
- The marker data to take into considerationformat
- the format stringarg
- the argumentpublic void log(Level level, org.slf4j.Marker marker, String format, Object arg1, Object arg2)
Level.DEBUG
, this method will delegate to
Logger.debug(String, Object, Object)
on the decorated logger.level
- the level at which to logmarker
- The marker data to take into considerationformat
- the format stringarg1
- the first argumentarg2
- the second argumentpublic void log(Level level, org.slf4j.Marker marker, String format, Object... arguments)
Level.DEBUG
, this method will delegate to
Logger.debug(String, Object...)
on the decorated logger.level
- the level at which to logmarker
- The marker data to take into considerationformat
- the format stringarguments
- a list of 3 or more argumentspublic void log(Level level, org.slf4j.Marker marker, String msg, Throwable throwable)
Level.DEBUG
, this method will delegate to
Logger.debug(String, Throwable)
on the decorated logger.level
- the level at which to logmarker
- The marker data to take into considerationmsg
- the message string to be loggedthrowable
- the exception (throwable) to logpublic String getName()
getName
in interface org.slf4j.Logger
public boolean isTraceEnabled()
isTraceEnabled
in interface org.slf4j.Logger
public void trace(String msg)
trace
in interface org.slf4j.Logger
public void trace(String format, Object arg)
trace
in interface org.slf4j.Logger
public void trace(String format, Object arg1, Object arg2)
trace
in interface org.slf4j.Logger
public void trace(String format, Object... arguments)
trace
in interface org.slf4j.Logger
public void trace(String msg, Throwable throwable)
trace
in interface org.slf4j.Logger
public boolean isTraceEnabled(org.slf4j.Marker marker)
isTraceEnabled
in interface org.slf4j.Logger
public void trace(org.slf4j.Marker marker, String msg)
trace
in interface org.slf4j.Logger
public void trace(org.slf4j.Marker marker, String format, Object arg)
trace
in interface org.slf4j.Logger
public void trace(org.slf4j.Marker marker, String format, Object arg1, Object arg2)
trace
in interface org.slf4j.Logger
public void trace(org.slf4j.Marker marker, String format, Object... arguments)
trace
in interface org.slf4j.Logger
public void trace(org.slf4j.Marker marker, String msg, Throwable throwable)
trace
in interface org.slf4j.Logger
public boolean isDebugEnabled()
isDebugEnabled
in interface org.slf4j.Logger
public void debug(String msg)
debug
in interface org.slf4j.Logger
public void debug(String format, Object arg)
debug
in interface org.slf4j.Logger
public void debug(String format, Object arg1, Object arg2)
debug
in interface org.slf4j.Logger
public void debug(String format, Object... arguments)
debug
in interface org.slf4j.Logger
public void debug(String msg, Throwable throwable)
debug
in interface org.slf4j.Logger
public boolean isDebugEnabled(org.slf4j.Marker marker)
isDebugEnabled
in interface org.slf4j.Logger
public void debug(org.slf4j.Marker marker, String msg)
debug
in interface org.slf4j.Logger
public void debug(org.slf4j.Marker marker, String format, Object arg)
debug
in interface org.slf4j.Logger
public void debug(org.slf4j.Marker marker, String format, Object arg1, Object arg2)
debug
in interface org.slf4j.Logger
public void debug(org.slf4j.Marker marker, String format, Object... arguments)
debug
in interface org.slf4j.Logger
public void debug(org.slf4j.Marker marker, String msg, Throwable throwable)
debug
in interface org.slf4j.Logger
public boolean isInfoEnabled()
isInfoEnabled
in interface org.slf4j.Logger
public void info(String msg)
info
in interface org.slf4j.Logger
public void info(String format, Object arg1, Object arg2)
info
in interface org.slf4j.Logger
public void info(String format, Object... arguments)
info
in interface org.slf4j.Logger
public void info(String msg, Throwable throwable)
info
in interface org.slf4j.Logger
public boolean isInfoEnabled(org.slf4j.Marker marker)
isInfoEnabled
in interface org.slf4j.Logger
public void info(org.slf4j.Marker marker, String msg)
info
in interface org.slf4j.Logger
public void info(org.slf4j.Marker marker, String format, Object arg)
info
in interface org.slf4j.Logger
public void info(org.slf4j.Marker marker, String format, Object arg1, Object arg2)
info
in interface org.slf4j.Logger
public void info(org.slf4j.Marker marker, String format, Object... arguments)
info
in interface org.slf4j.Logger
public void info(org.slf4j.Marker marker, String msg, Throwable throwable)
info
in interface org.slf4j.Logger
public boolean isWarnEnabled()
isWarnEnabled
in interface org.slf4j.Logger
public void warn(String msg)
warn
in interface org.slf4j.Logger
public void warn(String format, Object... arguments)
warn
in interface org.slf4j.Logger
public void warn(String format, Object arg1, Object arg2)
warn
in interface org.slf4j.Logger
public void warn(String msg, Throwable throwable)
warn
in interface org.slf4j.Logger
public boolean isWarnEnabled(org.slf4j.Marker marker)
isWarnEnabled
in interface org.slf4j.Logger
public void warn(org.slf4j.Marker marker, String msg)
warn
in interface org.slf4j.Logger
public void warn(org.slf4j.Marker marker, String format, Object arg)
warn
in interface org.slf4j.Logger
public void warn(org.slf4j.Marker marker, String format, Object arg1, Object arg2)
warn
in interface org.slf4j.Logger
public void warn(org.slf4j.Marker marker, String format, Object... arguments)
warn
in interface org.slf4j.Logger
public void warn(org.slf4j.Marker marker, String msg, Throwable throwable)
warn
in interface org.slf4j.Logger
public boolean isErrorEnabled()
isErrorEnabled
in interface org.slf4j.Logger
public void error(String msg)
error
in interface org.slf4j.Logger
public void error(String format, Object arg)
error
in interface org.slf4j.Logger
public void error(String format, Object arg1, Object arg2)
error
in interface org.slf4j.Logger
public void error(String format, Object... arguments)
error
in interface org.slf4j.Logger
public void error(String msg, Throwable throwable)
error
in interface org.slf4j.Logger
public boolean isErrorEnabled(org.slf4j.Marker marker)
isErrorEnabled
in interface org.slf4j.Logger
public void error(org.slf4j.Marker marker, String msg)
error
in interface org.slf4j.Logger
public void error(org.slf4j.Marker marker, String format, Object arg)
error
in interface org.slf4j.Logger
public void error(org.slf4j.Marker marker, String format, Object arg1, Object arg2)
error
in interface org.slf4j.Logger
public void error(org.slf4j.Marker marker, String format, Object... arguments)
error
in interface org.slf4j.Logger
Copyright © 2013. All Rights Reserved.