public interface Logger
The canonical way to obtain a Logger for a class is through LogManager. Typically, each class gets its own Logger named after its fully qualified class name (the default Logger name when obtained through the LogManager method). Thus, the simplest way to use this would be like so:
public class MyClass {
private static final Logger LOGGER = LogManager.getLogger();
// ...
}
For ease of filtering, searching, sorting, etc., it is generally a good idea to create Loggers for each class rather than sharing Loggers. Instead, Markers should be used for shared, filterable identification.
For service provider implementations, it is recommended to extend the AbstractLogger class rather than implementing this interface directly.
Logger interface to support lambda expressions. The new methods allow client code to lazily log messages without explicitly checking if the requested log level is enabled. For example, previously one would write:
// pre-Java 8 style optimization: explicitly check the log level
// to make sure the expensiveOperation() method is only called if necessary
if (logger.isTraceEnabled()) {
logger.trace("Some long-running operation returned {}", expensiveOperation());
}
With Java 8, the same effect can be achieved with a lambda expression:
// Java-8 style optimization: no need to explicitly check the log level:
// the lambda expression is not evaluated if the TRACE level is not enabled
logger.trace("Some long-running operation returned {}", () -> expensiveOperation());
| Modifier and Type | Method and Description |
|---|---|
void |
catching(Level
Logs an exception or error that has been caught to a specific logging level.
|
void |
catching(Throwable
Logs an exception or error that has been caught.
|
void |
debug(Marker
Logs a message with the specific Marker at the
DEBUG level.
|
void |
debug(Marker
Logs a message which is only to be constructed if the logging level is the
DEBUG level with the specified Marker.
|
void |
debug(Marker
|
void |
debug(Marker
Logs a message with the specific Marker at the
DEBUG level.
|
void |
debug(Marker
Logs a message object with the
DEBUG level.
|
void |
debug(Marker
|
void |
debug(Marker
Logs a message object with the
DEBUG level.
|
void |
debug(Marker
Logs a message with parameters at the
DEBUG level.
|
void |
debug(Marker
Logs a message with parameters which are only to be constructed if the logging level is the
DEBUG level.
|
void |
debug(Marker
|
void |
debug(Marker
Logs a message which is only to be constructed if the logging level is the
DEBUG level with the specified Marker.
|
void |
debug(Marker
|
void |
debug(Message
Logs a message with the specific Marker at the
DEBUG level.
|
void |
debug(MessageSupplier
Logs a message which is only to be constructed if the logging level is the
DEBUG level.
|
void |
debug(MessageSupplier
|
void |
debug(Message
Logs a message with the specific Marker at the
DEBUG level.
|
void |
debug(Object
Logs a message object with the
DEBUG level.
|
void |
debug(Object
|
void |
debug(String
Logs a message object with the
DEBUG level.
|
void |
debug(String
Logs a message with parameters at the
DEBUG level.
|
void |
debug(String
Logs a message with parameters which are only to be constructed if the logging level is the
DEBUG level.
|
void |
debug(String
|
void |
debug(Supplier
Logs a message which is only to be constructed if the logging level is the
DEBUG level.
|
void |
debug(Supplier
|
void |
entry()
Logs entry to a method.
|
void |
entry(Object
Logs entry to a method along with its parameters.
|
void |
error(Marker
Logs a message with the specific Marker at the
ERROR level.
|
void |
error(Marker
Logs a message which is only to be constructed if the logging level is the
ERROR level with the specified Marker.
|
void |
error(Marker
|
void |
error(Marker
Logs a message with the specific Marker at the
ERROR level.
|
void |
error(Marker
Logs a message object with the
ERROR level.
|
void |
error(Marker
|
void |
error(Marker
Logs a message object with the
ERROR level.
|
void |
error(Marker
Logs a message with parameters at the
ERROR level.
|
void |
error(Marker
Logs a message with parameters which are only to be constructed if the logging level is the
ERROR level.
|
void |
error(Marker
|
void |
error(Marker
Logs a message which is only to be constructed if the logging level is the
ERROR level with the specified Marker.
|
void |
error(Marker
|
void |
error(Message
Logs a message with the specific Marker at the
ERROR level.
|
void |
error(MessageSupplier
Logs a message which is only to be constructed if the logging level is the
ERROR level.
|
void |
error(MessageSupplier
|
void |
error(Message
Logs a message with the specific Marker at the
ERROR level.
|
void |
error(Object
Logs a message object with the
ERROR level.
|
void |
error(Object
|
void |
error(String
Logs a message object with the
ERROR level.
|
void |
error(String
Logs a message with parameters at the
ERROR level.
|
void |
error(String
Logs a message with parameters which are only to be constructed if the logging level is the
ERROR level.
|
void |
error(String
|
void |
error(Supplier
Logs a message which is only to be constructed if the logging level is the
ERROR level.
|
void |
error(Supplier
|
void |
exit()
Logs exit from a method.
|
<R> R |
exit(R result)
Logs exiting from a method with the result.
|
void |
fatal(Marker
Logs a message with the specific Marker at the
FATAL level.
|
void |
fatal(Marker
Logs a message which is only to be constructed if the logging level is the
FATAL level with the specified Marker.
|
void |
fatal(Marker
|
void |
fatal(Marker
Logs a message with the specific Marker at the
FATAL level.
|
void |
fatal(Marker
Logs a message object with the
FATAL level.
|
void |
fatal(Marker
|
void |
fatal(Marker
Logs a message object with the
FATAL level.
|
void |
fatal(Marker
Logs a message with parameters at the
FATAL level.
|
void |
fatal(Marker
Logs a message with parameters which are only to be constructed if the logging level is the
FATAL level.
|
void |
fatal(Marker
|
void |
fatal(Marker
Logs a message which is only to be constructed if the logging level is the
FATAL level with the specified Marker.
|
void |
fatal(Marker
|
void |
fatal(Message
Logs a message with the specific Marker at the
FATAL level.
|
void |
fatal(MessageSupplier
Logs a message which is only to be constructed if the logging level is the
FATAL level.
|
void |
fatal(MessageSupplier
|
void |
fatal(Message
Logs a message with the specific Marker at the
FATAL level.
|
void |
fatal(Object
Logs a message object with the
FATAL level.
|
void |
fatal(Object
|
void |
fatal(String
Logs a message object with the
FATAL level.
|
void |
fatal(String
Logs a message with parameters at the
FATAL level.
|
void |
fatal(String
Logs a message with parameters which are only to be constructed if the logging level is the
FATAL level.
|
void |
fatal(String
|
void |
fatal(Supplier
Logs a message which is only to be constructed if the logging level is the
FATAL level.
|
void |
fatal(Supplier
|
Level |
getLevel()
Gets the Level associated with the Logger.
|
MessageFactory |
getMessageFactory()
Gets the message factory used to convert message Objects and Strings into actual log Messages.
|
String |
getName()
Gets the logger name.
|
void |
info(Marker
Logs a message with the specific Marker at the
INFO level.
|
void |
info(Marker
Logs a message which is only to be constructed if the logging level is the
INFO level with the specified Marker.
|
void |
info(Marker
|
void |
info(Marker
Logs a message with the specific Marker at the
INFO level.
|
void |
info(Marker
Logs a message object with the
INFO level.
|
void |
info(Marker
|
void |
info(Marker
Logs a message object with the
INFO level.
|
void |
info(Marker
Logs a message with parameters at the
INFO level.
|
void |
info(Marker
Logs a message with parameters which are only to be constructed if the logging level is the
INFO level.
|
void |
info(Marker
|
void |
info(Marker
Logs a message which is only to be constructed if the logging level is the
INFO level with the specified Marker.
|
void |
info(Marker
|
void |
info(Message
Logs a message with the specific Marker at the
INFO level.
|
void |
info(MessageSupplier
Logs a message which is only to be constructed if the logging level is the
INFO level.
|
void |
info(MessageSupplier
|
void |
info(Message
Logs a message with the specific Marker at the
INFO level.
|
void |
info(Object
Logs a message object with the
INFO level.
|
void |
info(Object
|
void |
info(String
Logs a message object with the
INFO level.
|
void |
info(String
Logs a message with parameters at the
INFO level.
|
void |
info(String
Logs a message with parameters which are only to be constructed if the logging level is the
INFO level.
|
void |
info(String
|
void |
info(Supplier
Logs a message which is only to be constructed if the logging level is the
INFO level.
|
void |
info(Supplier
|
boolean |
isDebugEnabled()
Checks whether this Logger is enabled for the
DEBUG Level.
|
boolean |
isDebugEnabled(Marker
Checks whether this Logger is enabled for the
DEBUG Level.
|
boolean |
isEnabled(Level
Checks whether this Logger is enabled for the the given Level.
|
boolean |
isEnabled(Level
Checks whether this logger is enabled at the specified level and an optional Marker.
|
boolean |
isErrorEnabled()
Checks whether this Logger is enabled for the
ERROR Level.
|
boolean |
isErrorEnabled(Marker
Checks whether this Logger is enabled for the
ERROR Level.
|
boolean |
isFatalEnabled()
Checks whether this Logger is enabled for the
FATAL Level.
|
boolean |
isFatalEnabled(Marker
Checks whether this Logger is enabled for the
FATAL Level.
|
boolean |
isInfoEnabled()
Checks whether this Logger is enabled for the
INFO Level.
|
boolean |
isInfoEnabled(Marker
Checks whether this Logger is enabled for the
INFO Level.
|
boolean |
isTraceEnabled()
Checks whether this Logger is enabled for the
TRACE level.
|
boolean |
isTraceEnabled(Marker
Checks whether this Logger is enabled for the
TRACE level.
|
boolean |
isWarnEnabled()
Checks whether this Logger is enabled for the
WARN Level.
|
boolean |
isWarnEnabled(Marker
Checks whether this Logger is enabled for the
WARN Level.
|
void |
log(Level
Logs a message with the specific Marker at the given level.
|
void |
log(Level
Logs a message which is only to be constructed if the logging level is the specified level with the specified Marker.
|
void |
log(Level
Logs a message (only to be constructed if the logging level is the specified level) with the specified Marker and including the stack log of the
Throwable
t passed as parameter.
|
void |
log(Level
Logs a message with the specific Marker at the given level.
|
void |
log(Level
Logs a message object with the given level.
|
void |
log(Level
Logs a message at the given level including the stack trace of the
Throwable
t passed as parameter.
|
void |
log(Level
Logs a message object with the given level.
|
void |
log(Level
Logs a message with parameters at the given level.
|
void |
log(Level
Logs a message with parameters which are only to be constructed if the logging level is the specified level.
|
void |
log(Level
Logs a message at the given level including the stack trace of the
Throwable
t passed as parameter.
|
void |
log(Level
Logs a message (only to be constructed if the logging level is the specified level) with the specified Marker.
|
void |
log(Level
Logs a message (only to be constructed if the logging level is the specified level) with the specified Marker and including the stack log of the
Throwable
t passed as parameter.
|
void |
log(Level
Logs a message with the specific Marker at the given level.
|
void |
log(Level
Logs a message which is only to be constructed if the logging level is the specified level.
|
void |
log(Level
Logs a message (only to be constructed if the logging level is the specified level) including the stack log of the
Throwable
t passed as parameter.
|
void |
log(Level
Logs a message with the specific Marker at the given level.
|
void |
log(Level
Logs a message object with the given level.
|
void |
log(Level
Logs a message at the given level including the stack trace of the
Throwable
t passed as parameter.
|
void |
log(Level
Logs a message object with the given level.
|
void |
log(Level
Logs a message with parameters at the given level.
|
void |
log(Level
Logs a message with parameters which are only to be constructed if the logging level is the specified level.
|
void |
log(Level
Logs a message at the given level including the stack trace of the
Throwable
t passed as parameter.
|
void |
log(Level
Logs a message which is only to be constructed if the logging level is the specified level.
|
void |
log(Level
Logs a message (only to be constructed if the logging level is the specified level) including the stack log of the
Throwable
t passed as parameter.
|
void |
printf(Level
Logs a formatted message using the specified format string and arguments.
|
void |
printf(Level
Logs a formatted message using the specified format string and arguments.
|
<T extends Throwable |
throwing(Level
Logs an exception or error to be thrown.
|
<T extends Throwable |
throwing(T t)
Logs an exception or error to be thrown.
|
void |
trace(Marker
Logs a message with the specific Marker at the
TRACE level.
|
void |
trace(Marker
Logs a message which is only to be constructed if the logging level is the
TRACE level with the specified Marker.
|
void |
trace(Marker
|
void |
trace(Marker
Logs a message with the specific Marker at the
TRACE level.
|
void |
trace(Marker
Logs a message object with the
TRACE level.
|
void |
trace(Marker
|
void |
trace(Marker
Logs a message object with the
TRACE level.
|
void |
trace(Marker
Logs a message with parameters at the
TRACE level.
|
void |
trace(Marker
Logs a message with parameters which are only to be constructed if the logging level is the
TRACE level.
|
void |
trace(Marker
|
void |
trace(Marker
Logs a message which is only to be constructed if the logging level is the
TRACE level with the specified Marker.
|
void |
trace(Marker
|
void |
trace(Message
Logs a message with the specific Marker at the
TRACE level.
|
void |
trace(MessageSupplier
Logs a message which is only to be constructed if the logging level is the
TRACE level.
|
void |
trace(MessageSupplier
|
void |
trace(Message
Logs a message with the specific Marker at the
TRACE level.
|
void |
trace(Object
Logs a message object with the
TRACE level.
|
void |
trace(Object
|
void |
trace(String
Logs a message object with the
TRACE level.
|
void |
trace(String
Logs a message with parameters at the
TRACE level.
|
void |
trace(String
Logs a message with parameters which are only to be constructed if the logging level is the
TRACE level.
|
void |
trace(String
|
void |
trace(Supplier
Logs a message which is only to be constructed if the logging level is the
TRACE level.
|
void |
trace(Supplier
|
void |
warn(Marker
Logs a message with the specific Marker at the
WARN level.
|
void |
warn(Marker
Logs a message which is only to be constructed if the logging level is the
WARN level with the specified Marker.
|
void |
warn(Marker
|
void |
warn(Marker
Logs a message with the specific Marker at the
WARN level.
|
void |
warn(Marker
Logs a message object with the
WARN level.
|
void |
warn(Marker
|
void |
warn(Marker
Logs a message object with the
WARN level.
|
void |
warn(Marker
Logs a message with parameters at the
WARN level.
|
void |
warn(Marker
Logs a message with parameters which are only to be constructed if the logging level is the
WARN level.
|
void |
warn(Marker
|
void |
warn(Marker
Logs a message which is only to be constructed if the logging level is the
WARN level with the specified Marker.
|
void |
warn(Marker
|
void |
warn(Message
Logs a message with the specific Marker at the
WARN level.
|
void |
warn(MessageSupplier
Logs a message which is only to be constructed if the logging level is the
WARN level.
|
void |
warn(MessageSupplier
|
void |
warn(Message
Logs a message with the specific Marker at the
WARN level.
|
void |
warn(Object
Logs a message object with the
WARN level.
|
void |
warn(Object
|
void |
warn(String
Logs a message object with the
WARN level.
|
void |
warn(String
Logs a message with parameters at the
WARN level.
|
void |
warn(String
Logs a message with parameters which are only to be constructed if the logging level is the
WARN level.
|
void |
warn(String
|
void |
warn(Supplier
Logs a message which is only to be constructed if the logging level is the
WARN level.
|
void |
warn(Supplier
|
void catching(Levellevel, Throwable t)
level - The logging Level.
t - The Throwable.
void catching(Throwablet)
main() method), this method is ideal for it.
t - The Throwable.
void debug(Markermarker, Message msg)
DEBUG level.
marker - the marker data specific to this log statement
msg - the message string to be logged
void debug(Markermarker, Message msg, Throwable t)
DEBUG level.
marker - the marker data specific to this log statement
msg - the message string to be logged
t - A Throwable or null.
void debug(Markermarker, MessageSupplier msgSupplier)
DEBUG level with the specified Marker. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message.
void debug(Markermarker, MessageSupplier msgSupplier, Throwable t)
DEBUG level) with the specified Marker and including the stack trace of the
Throwable
t passed as parameter. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message.
t - A Throwable or null.
void debug(Markermarker, Object message)
DEBUG level.
marker - the marker data specific to this log statement
message - the message object to log.
void debug(Markermarker, Object message, Throwable t)
marker - the marker data specific to this log statement
message - the message to log.
t - the exception to log, including its stack trace.
void debug(Markermarker, String message)
DEBUG level.
marker - the marker data specific to this log statement
message - the message object to log.
void debug(Markermarker, String message, Object ... params)
DEBUG level.
marker - the marker data specific to this log statement
message - the message to log; the format depends on the message factory.
params - parameters to the message.
getMessageFactory()
void debug(Markermarker, String message, Supplier <?>... paramSuppliers)
DEBUG level.
marker - the marker data specific to this log statement
message - the message to log; the format depends on the message factory.
paramSuppliers - An array of functions, which when called, produce the desired log message parameters.
void debug(Markermarker, String message, Throwable t)
marker - the marker data specific to this log statement
message - the message to log.
t - the exception to log, including its stack trace.
void debug(Markermarker, Supplier <?> msgSupplier)
DEBUG level with the specified Marker.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
void debug(Markermarker, Supplier <?> msgSupplier, Throwable t)
DEBUG level) with the specified Marker and including the stack trace of the
Throwable
t passed as parameter.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
t - A Throwable or null.
void debug(Messagemsg)
DEBUG level.
msg - the message string to be logged
void debug(Messagemsg, Throwable t)
DEBUG level.
msg - the message string to be logged
t - A Throwable or null.
void debug(MessageSuppliermsgSupplier)
DEBUG level. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
msgSupplier - A function, which when called, produces the desired log message.
void debug(MessageSuppliermsgSupplier, Throwable t)
DEBUG level) including the stack trace of the
Throwable
t passed as parameter. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
msgSupplier - A function, which when called, produces the desired log message.
t - the exception to log, including its stack trace.
void debug(Objectmessage)
DEBUG level.
message - the message object to log.
void debug(Objectmessage, Throwable t)
message - the message to log.
t - the exception to log, including its stack trace.
void debug(Stringmessage)
DEBUG level.
message - the message string to log.
void debug(Stringmessage, Object ... params)
DEBUG level.
message - the message to log; the format depends on the message factory.
params - parameters to the message.
getMessageFactory()
void debug(Stringmessage, Supplier <?>... paramSuppliers)
DEBUG level.
message - the message to log; the format depends on the message factory.
paramSuppliers - An array of functions, which when called, produce the desired log message parameters.
void debug(Stringmessage, Throwable t)
message - the message to log.
t - the exception to log, including its stack trace.
void debug(Supplier<?> msgSupplier)
DEBUG level.
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
void debug(Supplier<?> msgSupplier, Throwable t)
DEBUG level) including the stack trace of the
Throwable
t passed as parameter.
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
t - the exception to log, including its stack trace.
void entry()
void entry(Object... params)
public void doSomething(String foo, int bar) {
LOGGER.entry(foo, bar);
// do something
}
The use of methods such as this are more effective when combined with aspect-oriented programming or other bytecode manipulation tools. It can be rather tedious (and messy) to use this type of method manually.
params - The parameters to the method. TODO Use of varargs results in array creation which can be a substantial portion of no-op case. LogMF/LogSF provides several overrides to avoid vararg except in edge cases. (RG) LogMF and LogSF implement these in LogXF which calls logger.callAppenders. callAppenders is part of the implementation and cannot be used by the API. Adding more methods here and in AbstractLogger is sufficient.
void error(Markermarker, Message msg)
ERROR level.
marker - the marker data specific to this log statement
msg - the message string to be logged
void error(Markermarker, Message msg, Throwable t)
ERROR level.
marker - the marker data specific to this log statement
msg - the message string to be logged
t - A Throwable or null.
void error(Markermarker, MessageSupplier msgSupplier)
ERROR level with the specified Marker. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message.
void error(Markermarker, MessageSupplier msgSupplier, Throwable t)
ERROR level) with the specified Marker and including the stack trace of the
Throwable
t passed as parameter. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message.
t - A Throwable or null.
void error(Markermarker, Object message)
ERROR level.
marker - the marker data specific to this log statement.
message - the message object to log.
void error(Markermarker, Object message, Throwable t)
marker - the marker data specific to this log statement.
message - the message object to log.
t - the exception to log, including its stack trace.
void error(Markermarker, String message)
ERROR level.
marker - the marker data specific to this log statement.
message - the message object to log.
void error(Markermarker, String message, Object ... params)
ERROR level.
marker - the marker data specific to this log statement.
message - the message to log; the format depends on the message factory.
params - parameters to the message.
TODO Likely to misinterpret existing log4j client code that intended to call info(Object,Throwable). Incurs array creation expense on every call. (RG) I assume you meant error, not info. It isn't possible to be misinterpreted as the previous method is for that signature. Methods should be added to avoid varargs for 1, 2 or 3 parameters.
void error(Markermarker, String message, Supplier <?>... paramSuppliers)
ERROR level.
marker - the marker data specific to this log statement
message - the message to log; the format depends on the message factory.
paramSuppliers - An array of functions, which when called, produce the desired log message parameters.
void error(Markermarker, String message, Throwable t)
marker - the marker data specific to this log statement.
message - the message object to log.
t - the exception to log, including its stack trace.
void error(Markermarker, Supplier <?> msgSupplier)
ERROR level with the specified Marker.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
void error(Markermarker, Supplier <?> msgSupplier, Throwable t)
ERROR level) with the specified Marker and including the stack trace of the
Throwable
t passed as parameter.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
t - A Throwable or null.
void error(Messagemsg)
ERROR level.
msg - the message string to be logged
void error(Messagemsg, Throwable t)
ERROR level.
msg - the message string to be logged
t - A Throwable or null.
void error(MessageSuppliermsgSupplier)
ERROR level. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
msgSupplier - A function, which when called, produces the desired log message.
void error(MessageSuppliermsgSupplier, Throwable t)
ERROR level) including the stack trace of the
Throwable
t passed as parameter. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
msgSupplier - A function, which when called, produces the desired log message.
t - the exception to log, including its stack trace.
void error(Objectmessage)
ERROR level.
message - the message object to log.
void error(Objectmessage, Throwable t)
message - the message object to log.
t - the exception to log, including its stack trace.
void error(Stringmessage)
ERROR level.
message - the message string to log.
void error(Stringmessage, Object ... params)
ERROR level.
message - the message to log; the format depends on the message factory.
params - parameters to the message.
TODO Likely to misinterpret existing log4j client code that intended to call info(Object,Throwable). Incurs array creation expense on every call. (RG) I assume you meant error, not info. It isn't possible to be misinterpreted as the previous method is for that signature. Methods should be added to avoid varargs for 1, 2 or 3 parameters.
void error(Stringmessage, Supplier <?>... paramSuppliers)
ERROR level.
message - the message to log; the format depends on the message factory.
paramSuppliers - An array of functions, which when called, produce the desired log message parameters.
void error(Stringmessage, Throwable t)
message - the message object to log.
t - the exception to log, including its stack trace.
void error(Supplier<?> msgSupplier)
ERROR level.
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
void error(Supplier<?> msgSupplier, Throwable t)
ERROR level) including the stack trace of the
Throwable
t passed as parameter.
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
t - the exception to log, including its stack trace.
void exit()
<R> R exit(R result)
return LOGGER.exit(myResult);
R - The type of the parameter and object being returned.
result - The result being returned from the method call.
void fatal(Markermarker, Message msg)
FATAL level.
marker - the marker data specific to this log statement
msg - the message string to be logged
void fatal(Markermarker, Message msg, Throwable t)
FATAL level.
marker - the marker data specific to this log statement
msg - the message string to be logged
t - A Throwable or null.
void fatal(Markermarker, MessageSupplier msgSupplier)
FATAL level with the specified Marker. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message.
void fatal(Markermarker, MessageSupplier msgSupplier, Throwable t)
FATAL level) with the specified Marker and including the stack trace of the
Throwable
t passed as parameter. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message.
t - A Throwable or null.
void fatal(Markermarker, Object message)
FATAL level.
marker - The marker data specific to this log statement.
message - the message object to log.
void fatal(Markermarker, Object message, Throwable t)
marker - The marker data specific to this log statement.
message - the message object to log.
t - the exception to log, including its stack trace.
void fatal(Markermarker, String message)
FATAL level.
marker - The marker data specific to this log statement.
message - the message object to log.
void fatal(Markermarker, String message, Object ... params)
FATAL level.
marker - The marker data specific to this log statement.
message - the message to log; the format depends on the message factory.
params - parameters to the message.
TODO Likely to misinterpret existing log4j client code that intended to call info(Object,Throwable). Incurs array creation expense on every call.(RG) I assume you meant fatal, not info. It isn't possible to be misinterpreted as the previous method is for that signature. Methods should be added to avoid varargs for 1, 2 or 3 parameters.
void fatal(Markermarker, String message, Supplier <?>... paramSuppliers)
FATAL level.
marker - the marker data specific to this log statement
message - the message to log; the format depends on the message factory.
paramSuppliers - An array of functions, which when called, produce the desired log message parameters.
void fatal(Markermarker, String message, Throwable t)
marker - The marker data specific to this log statement.
message - the message object to log.
t - the exception to log, including its stack trace.
void fatal(Markermarker, Supplier <?> msgSupplier)
FATAL level with the specified Marker.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
void fatal(Markermarker, Supplier <?> msgSupplier, Throwable t)
FATAL level) with the specified Marker and including the stack trace of the
Throwable
t passed as parameter.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
t - A Throwable or null.
void fatal(Messagemsg)
FATAL level.
msg - the message string to be logged
void fatal(Messagemsg, Throwable t)
FATAL level.
msg - the message string to be logged
t - A Throwable or null.
void fatal(MessageSuppliermsgSupplier)
FATAL level. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
msgSupplier - A function, which when called, produces the desired log message.
void fatal(MessageSuppliermsgSupplier, Throwable t)
FATAL level) including the stack trace of the
Throwable
t passed as parameter. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
msgSupplier - A function, which when called, produces the desired log message.
t - the exception to log, including its stack trace.
void fatal(Objectmessage)
FATAL level.
message - the message object to log.
void fatal(Objectmessage, Throwable t)
message - the message object to log.
t - the exception to log, including its stack trace.
void fatal(Stringmessage)
FATAL level.
message - the message string to log.
void fatal(Stringmessage, Object ... params)
FATAL level.
message - the message to log; the format depends on the message factory.
params - parameters to the message.
TODO Likely to misinterpret existing log4j client code that intended to call info(Object,Throwable). Incurs array creation expense on every call.(RG) I assume you meant fatal, not info. It isn't possible to be misinterpreted as the previous method is for that signature. Methods should be added to avoid varargs for 1, 2 or 3 parameters.
void fatal(Stringmessage, Supplier <?>... paramSuppliers)
FATAL level.
message - the message to log; the format depends on the message factory.
paramSuppliers - An array of functions, which when called, produce the desired log message parameters.
void fatal(Stringmessage, Throwable t)
message - the message object to log.
t - the exception to log, including its stack trace.
void fatal(Supplier<?> msgSupplier)
FATAL level.
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
void fatal(Supplier<?> msgSupplier, Throwable t)
FATAL level) including the stack trace of the
Throwable
t passed as parameter.
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
t - the exception to log, including its stack trace.
LevelgetLevel()
MessageFactorygetMessageFactory()
StringgetName()
void info(Markermarker, Message msg)
INFO level.
marker - the marker data specific to this log statement
msg - the message string to be logged
void info(Markermarker, Message msg, Throwable t)
INFO level.
marker - the marker data specific to this log statement
msg - the message string to be logged
t - A Throwable or null.
void info(Markermarker, MessageSupplier msgSupplier)
INFO level with the specified Marker. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message.
void info(Markermarker, MessageSupplier msgSupplier, Throwable t)
INFO level) with the specified Marker and including the stack trace of the
Throwable
t passed as parameter. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message.
t - A Throwable or null.
void info(Markermarker, Object message)
INFO level.
marker - the marker data specific to this log statement
message - the message object to log.
void info(Markermarker, Object message, Throwable t)
marker - the marker data specific to this log statement
message - the message object to log.
t - the exception to log, including its stack trace.
void info(Markermarker, String message)
INFO level.
marker - the marker data specific to this log statement
message - the message object to log.
void info(Markermarker, String message, Object ... params)
INFO level.
marker - the marker data specific to this log statement
message - the message to log; the format depends on the message factory.
params - parameters to the message.
TODO Likely to misinterpret existing log4j client code that intended to call info(Object,Throwable). Incurs array creation expense on every call. (RG) It isn't possible to be misinterpreted as the previous method is for that signature. Methods should be added to avoid varargs for 1, 2 or 3 parameters.
void info(Markermarker, String message, Supplier <?>... paramSuppliers)
INFO level.
marker - the marker data specific to this log statement
message - the message to log; the format depends on the message factory.
paramSuppliers - An array of functions, which when called, produce the desired log message parameters.
void info(Markermarker, String message, Throwable t)
marker - the marker data specific to this log statement
message - the message object to log.
t - the exception to log, including its stack trace.
void info(Markermarker, Supplier <?> msgSupplier)
INFO level with the specified Marker.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
void info(Markermarker, Supplier <?> msgSupplier, Throwable t)
INFO level) with the specified Marker and including the stack trace of the
Throwable
t passed as parameter.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
t - A Throwable or null.
void info(Messagemsg)
INFO level.
msg - the message string to be logged
void info(Messagemsg, Throwable t)
INFO level.
msg - the message string to be logged
t - A Throwable or null.
void info(MessageSuppliermsgSupplier)
INFO level. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
msgSupplier - A function, which when called, produces the desired log message.
void info(MessageSuppliermsgSupplier, Throwable t)
INFO level) including the stack trace of the
Throwable
t passed as parameter. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
msgSupplier - A function, which when called, produces the desired log message.
t - the exception to log, including its stack trace.
void info(Objectmessage)
INFO level.
message - the message object to log.
void info(Objectmessage, Throwable t)
message - the message object to log.
t - the exception to log, including its stack trace.
void info(Stringmessage)
INFO level.
message - the message string to log.
void info(Stringmessage, Object ... params)
INFO level.
message - the message to log; the format depends on the message factory.
params - parameters to the message.
TODO Likely to misinterpret existing log4j client code that intended to call info(Object,Throwable). Incurs array creation expense on every call. (RG) It isn't possible to be misinterpreted as the previous method is for that signature. Methods should be added to avoid varargs for 1, 2 or 3 parameters.
void info(Stringmessage, Supplier <?>... paramSuppliers)
INFO level.
message - the message to log; the format depends on the message factory.
paramSuppliers - An array of functions, which when called, produce the desired log message parameters.
void info(Stringmessage, Throwable t)
message - the message object to log.
t - the exception to log, including its stack trace.
void info(Supplier<?> msgSupplier)
INFO level.
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
void info(Supplier<?> msgSupplier, Throwable t)
INFO level) including the stack trace of the
Throwable
t passed as parameter.
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
t - the exception to log, including its stack trace.
boolean isDebugEnabled()
DEBUG Level.
true if this Logger is enabled for level DEBUG,
false otherwise.
boolean isDebugEnabled(Markermarker)
DEBUG Level.
marker - The marker data specific to this log statement.
true if this Logger is enabled for level DEBUG,
false otherwise.
boolean isEnabled(Levellevel)
Note that passing in OFF always returns true.
level - the level to check
true if this Logger is enabled for level,
false otherwise.
boolean isEnabled(Levellevel, Marker marker)
level - The Level to check.
marker - The marker data specific to this log statement.
true if this Logger is enabled for level
WARN,
false otherwise.
boolean isErrorEnabled()
ERROR Level.
true if this Logger is enabled for level
ERROR,
false otherwise.
boolean isErrorEnabled(Markermarker)
ERROR Level.
marker - The marker data specific to this log statement.
true if this Logger is enabled for level
ERROR,
false otherwise.
boolean isFatalEnabled()
FATAL Level.
true if this Logger is enabled for level
FATAL,
false otherwise.
boolean isFatalEnabled(Markermarker)
FATAL Level.
marker - The marker data specific to this log statement.
true if this Logger is enabled for level
FATAL,
false otherwise.
boolean isInfoEnabled()
INFO Level.
true if this Logger is enabled for level INFO,
false otherwise.
boolean isInfoEnabled(Markermarker)
INFO Level.
marker - The marker data specific to this log statement.
true if this Logger is enabled for level INFO,
false otherwise.
boolean isTraceEnabled()
TRACE level.
true if this Logger is enabled for level TRACE,
false otherwise.
boolean isTraceEnabled(Markermarker)
TRACE level.
marker - The marker data specific to this log statement.
true if this Logger is enabled for level TRACE,
false otherwise.
boolean isWarnEnabled()
WARN Level.
true if this Logger is enabled for level
WARN,
false otherwise.
boolean isWarnEnabled(Markermarker)
WARN Level.
marker - The marker data specific to this log statement.
true if this Logger is enabled for level
WARN,
false otherwise.
void log(Levellevel, Marker marker, Message msg)
level - the logging level
marker - the marker data specific to this log statement
msg - the message string to be logged
void log(Levellevel, Marker marker, Message msg, Throwable t)
level - the logging level
marker - the marker data specific to this log statement
msg - the message string to be logged
t - A Throwable or null.
void log(Levellevel, Marker marker, MessageSupplier msgSupplier)
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
level - the logging level
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message.
void log(Levellevel, Marker marker, MessageSupplier msgSupplier, Throwable t)
Throwable
t passed as parameter. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
level - the logging level
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message.
t - A Throwable or null.
void log(Levellevel, Marker marker, Object message)
level - the logging level
marker - the marker data specific to this log statement
message - the message object to log.
void log(Levellevel, Marker marker, Object message, Throwable t)
Throwable
t passed as parameter.
level - the logging level
marker - the marker data specific to this log statement
message - the message to log.
t - the exception to log, including its stack trace.
void log(Levellevel, Marker marker, String message)
level - the logging level
marker - the marker data specific to this log statement
message - the message object to log.
void log(Levellevel, Marker marker, String message, Object ... params)
level - the logging level
marker - the marker data specific to this log statement
message - the message to log; the format depends on the message factory.
params - parameters to the message.
getMessageFactory()
void log(Levellevel, Marker marker, String message, Supplier <?>... paramSuppliers)
level - the logging level
marker - the marker data specific to this log statement
message - the message to log; the format depends on the message factory.
paramSuppliers - An array of functions, which when called, produce the desired log message parameters.
void log(Levellevel, Marker marker, String message, Throwable t)
Throwable
t passed as parameter.
level - the logging level
marker - the marker data specific to this log statement
message - the message to log.
t - the exception to log, including its stack trace.
void log(Levellevel, Marker marker, Supplier <?> msgSupplier)
level - the logging level
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
void log(Levellevel, Marker marker, Supplier <?> msgSupplier, Throwable t)
Throwable
t passed as parameter.
level - the logging level
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
t - A Throwable or null.
void log(Levellevel, Message msg)
level - the logging level
msg - the message string to be logged
void log(Levellevel, Message msg, Throwable t)
level - the logging level
msg - the message string to be logged
t - A Throwable or null.
void log(Levellevel, MessageSupplier msgSupplier)
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
level - the logging level
msgSupplier - A function, which when called, produces the desired log message.
void log(Levellevel, MessageSupplier msgSupplier, Throwable t)
Throwable
t passed as parameter. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
level - the logging level
msgSupplier - A function, which when called, produces the desired log message.
t - the exception to log, including its stack log.
void log(Levellevel, Object message)
level - the logging level
message - the message object to log.
void log(Levellevel, Object message, Throwable t)
Throwable
t passed as parameter.
level - the logging level
message - the message to log.
t - the exception to log, including its stack trace.
void log(Levellevel, String message)
level - the logging level
message - the message string to log.
void log(Levellevel, String message, Object ... params)
level - the logging level
message - the message to log; the format depends on the message factory.
params - parameters to the message.
getMessageFactory()
void log(Levellevel, String message, Supplier <?>... paramSuppliers)
level - the logging level
message - the message to log; the format depends on the message factory.
paramSuppliers - An array of functions, which when called, produce the desired log message parameters.
void log(Levellevel, String message, Throwable t)
Throwable
t passed as parameter.
level - the logging level
message - the message to log.
t - the exception to log, including its stack trace.
void log(Levellevel, Supplier <?> msgSupplier)
level - the logging level
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
void log(Levellevel, Supplier <?> msgSupplier, Throwable t)
Throwable
t passed as parameter.
level - the logging level
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
t - the exception to log, including its stack log.
void printf(Levellevel, Marker marker, String format, Object ... params)
level - The logging Level.
marker - the marker data specific to this log statement.
format - The format String.
params - Arguments specified by the format.
void printf(Levellevel, String format, Object ... params)
level - The logging Level.
format - The format String.
params - Arguments specified by the format.
<T extends Throwable> T throwing(Level level, T t)
throw logger.throwing(Level.DEBUG, myException);
T - the Throwable type.
level - The logging Level.
t - The Throwable.
<T extends Throwable> T throwing(T t)
throw logger.throwing(myException);
T - the Throwable type.
t - The Throwable.
void trace(Markermarker, Message msg)
TRACE level.
marker - the marker data specific to this log statement
msg - the message string to be logged
void trace(Markermarker, Message msg, Throwable t)
TRACE level.
marker - the marker data specific to this log statement
msg - the message string to be logged
t - A Throwable or null.
void trace(Markermarker, MessageSupplier msgSupplier)
TRACE level with the specified Marker. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message.
void trace(Markermarker, MessageSupplier msgSupplier, Throwable t)
TRACE level) with the specified Marker and including the stack trace of the
Throwable
t passed as parameter. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message.
t - A Throwable or null.
void trace(Markermarker, Object message)
TRACE level.
marker - the marker data specific to this log statement
message - the message object to log.
void trace(Markermarker, Object message, Throwable t)
marker - the marker data specific to this log statement
message - the message object to log.
t - the exception to log, including its stack trace.
debug(String)
void trace(Markermarker, String message)
TRACE level.
marker - the marker data specific to this log statement
message - the message string to log.
void trace(Markermarker, String message, Object ... params)
TRACE level.
marker - the marker data specific to this log statement
message - the message to log; the format depends on the message factory.
params - parameters to the message.
getMessageFactory()
void trace(Markermarker, String message, Supplier <?>... paramSuppliers)
TRACE level.
marker - the marker data specific to this log statement
message - the message to log; the format depends on the message factory.
paramSuppliers - An array of functions, which when called, produce the desired log message parameters.
void trace(Markermarker, String message, Throwable t)
marker - the marker data specific to this log statement
message - the message object to log.
t - the exception to log, including its stack trace.
debug(String)
void trace(Markermarker, Supplier <?> msgSupplier)
TRACE level with the specified Marker.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
void trace(Markermarker, Supplier <?> msgSupplier, Throwable t)
TRACE level) with the specified Marker and including the stack trace of the
Throwable
t passed as parameter.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
t - A Throwable or null.
void trace(Messagemsg)
TRACE level.
msg - the message string to be logged
void trace(Messagemsg, Throwable t)
TRACE level.
msg - the message string to be logged
t - A Throwable or null.
void trace(MessageSuppliermsgSupplier)
TRACE level. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
msgSupplier - A function, which when called, produces the desired log message.
void trace(MessageSuppliermsgSupplier, Throwable t)
TRACE level) including the stack trace of the
Throwable
t passed as parameter. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
msgSupplier - A function, which when called, produces the desired log message.
t - the exception to log, including its stack trace.
void trace(Objectmessage)
TRACE level.
message - the message object to log.
void trace(Objectmessage, Throwable t)
message - the message object to log.
t - the exception to log, including its stack trace.
debug(String)
void trace(Stringmessage)
TRACE level.
message - the message string to log.
void trace(Stringmessage, Object ... params)
TRACE level.
message - the message to log; the format depends on the message factory.
params - parameters to the message.
getMessageFactory()
void trace(Stringmessage, Supplier <?>... paramSuppliers)
TRACE level.
message - the message to log; the format depends on the message factory.
paramSuppliers - An array of functions, which when called, produce the desired log message parameters.
void trace(Stringmessage, Throwable t)
message - the message object to log.
t - the exception to log, including its stack trace.
debug(String)
void trace(Supplier<?> msgSupplier)
TRACE level.
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
void trace(Supplier<?> msgSupplier, Throwable t)
TRACE level) including the stack trace of the
Throwable
t passed as parameter.
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
t - the exception to log, including its stack trace.
void warn(Markermarker, Message msg)
WARN level.
marker - the marker data specific to this log statement
msg - the message string to be logged
void warn(Markermarker, Message msg, Throwable t)
WARN level.
marker - the marker data specific to this log statement
msg - the message string to be logged
t - A Throwable or null.
void warn(Markermarker, MessageSupplier msgSupplier)
WARN level with the specified Marker. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message.
void warn(Markermarker, MessageSupplier msgSupplier, Throwable t)
WARN level) with the specified Marker and including the stack warn of the
Throwable
t passed as parameter. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message.
t - A Throwable or null.
void warn(Markermarker, Object message)
WARN level.
marker - the marker data specific to this log statement
message - the message object to log.
void warn(Markermarker, Object message, Throwable t)
marker - the marker data specific to this log statement
message - the message object to log.
t - the exception to log, including its stack trace.
void warn(Markermarker, String message)
WARN level.
marker - the marker data specific to this log statement
message - the message object to log.
void warn(Markermarker, String message, Object ... params)
WARN level.
marker - the marker data specific to this log statement.
message - the message to log; the format depends on the message factory.
params - parameters to the message.
TODO Likely to misinterpret existing log4j client code that intended to call info(Object,Throwable). Incurs array creation expense on every call. (RG) I assume you meant warn, not info. It isn't possible to be misinterpreted as the previous method is for that signature.Methods should be added to avoid varargs for 1, 2 or 3 parameters.
void warn(Markermarker, String message, Supplier <?>... paramSuppliers)
WARN level.
marker - the marker data specific to this log statement
message - the message to log; the format depends on the message factory.
paramSuppliers - An array of functions, which when called, produce the desired log message parameters.
void warn(Markermarker, String message, Throwable t)
marker - the marker data specific to this log statement
message - the message object to log.
t - the exception to log, including its stack trace.
void warn(Markermarker, Supplier <?> msgSupplier)
WARN level with the specified Marker.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
void warn(Markermarker, Supplier <?> msgSupplier, Throwable t)
WARN level) with the specified Marker and including the stack warn of the
Throwable
t passed as parameter.
marker - the marker data specific to this log statement
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
t - A Throwable or null.
void warn(Messagemsg)
WARN level.
msg - the message string to be logged
void warn(Messagemsg, Throwable t)
WARN level.
msg - the message string to be logged
t - A Throwable or null.
void warn(MessageSuppliermsgSupplier)
WARN level. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
msgSupplier - A function, which when called, produces the desired log message.
void warn(MessageSuppliermsgSupplier, Throwable t)
WARN level) including the stack warn of the
Throwable
t passed as parameter. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
msgSupplier - A function, which when called, produces the desired log message.
t - the exception to log, including its stack warn.
void warn(Objectmessage)
WARN level.
message - the message object to log.
void warn(Objectmessage, Throwable t)
message - the message object to log.
t - the exception to log, including its stack trace.
void warn(Stringmessage)
WARN level.
message - the message string to log.
void warn(Stringmessage, Object ... params)
WARN level.
message - the message to log; the format depends on the message factory.
params - parameters to the message.
TODO Likely to misinterpret existing log4j client code that intended to call info(Object,Throwable). Incurs array creation expense on every call. (RG) I assume you meant warn, not info. It isn't possible to be misinterpreted as the previous method is for that signature.Methods should be added to avoid varargs for 1, 2 or 3 parameters.
void warn(Stringmessage, Supplier <?>... paramSuppliers)
WARN level.
message - the message to log; the format depends on the message factory.
paramSuppliers - An array of functions, which when called, produce the desired log message parameters.
void warn(Stringmessage, Throwable t)
message - the message object to log.
t - the exception to log, including its stack trace.
void warn(Supplier<?> msgSupplier)
WARN level.
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
void warn(Supplier<?> msgSupplier, Throwable t)
WARN level) including the stack warn of the
Throwable
t passed as parameter.
msgSupplier - A function, which when called, produces the desired log message; the format depends on the message factory.
t - the exception to log, including its stack warn.