public abstract class AbstractLogger extends Objectimplements ExtendedLogger , Serializable
| Modifier and Type | Field and Description |
|---|---|
static Marker |
CATCHING_MARKER
Marker for catching exceptions.
|
static Class |
DEFAULT_MESSAGE_FACTORY_CLASS
The default MessageFactory class.
|
static Marker |
ENTRY_MARKER
Marker for method entry tracing.
|
static Marker |
EXCEPTION_MARKER
Marker for exception tracing.
|
static Marker |
EXIT_MARKER
Marker for method exit tracing.
|
static Marker |
FLOW_MARKER
Marker for flow tracing.
|
static Marker |
THROWING_MARKER
Marker for throwing exceptions.
|
| Constructor and Description |
|---|
AbstractLogger()
Creates a new logger named after this class (or subclass).
|
AbstractLogger(String
Creates a new named logger.
|
AbstractLogger(String
Creates a new named logger with a particular
MessageFactory.
|
| Modifier and Type | Method and Description |
|---|---|
void |
catching(Level
Logs an exception or error that has been caught to a specific logging level.
|
protected void |
catching(String
Logs a Throwable that has been caught with location information.
|
void |
catching(Throwable
Logs an exception or error that has been caught.
|
protected Message |
catchingMsg(Throwable
|
static void |
checkMessageFactory(ExtendedLogger
Checks that the message factory a logger was created with is the same as the given messageFactory.
|
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.
|
protected void |
entry(String
Logs entry to a method with location information.
|
protected Message |
entryMsg(int count, Object
|
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.
|
protected <R> R |
exit(String
Logs exiting from a method with the result and location information.
|
protected Message |
exitMsg(Object
|
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
|
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 |
logIfEnabled(String
Logs a message which is only to be constructed if the specified level is active.
|
void |
logIfEnabled(String
Logs a message if the specified level is active.
|
void |
logIfEnabled(String
Logs a message if the specified level is active.
|
void |
logIfEnabled(String
Logs a message if the specified level is active.
|
void |
logIfEnabled(String
Logs a message if the specified level is active.
|
void |
logIfEnabled(String
Logs a message whose parameters are only to be constructed if the specified level is active.
|
void |
logIfEnabled(String
Logs a message if the specified level is active.
|
void |
logIfEnabled(String
Logs a message which is only to be constructed if the specified level is active.
|
protected void |
logMessage(String
|
protected void |
logMessage(String
|
protected void |
logMessage(String
|
protected void |
logMessage(String
|
protected void |
logMessage(String
|
protected void |
logMessage(String
|
protected void |
logMessage(String
|
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.
|
protected <T extends Throwable |
throwing(String
Logs a Throwable to be thrown.
|
<T extends Throwable |
throwing(T t)
Logs an exception or error to be thrown.
|
protected Message |
throwingMsg(Throwable
|
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
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisEnabled, isEnabled, isEnabled, isEnabled, isEnabled, logMessagepublic static final MarkerFLOW_MARKER
public static final MarkerENTRY_MARKER
public static final MarkerEXIT_MARKER
public static final MarkerEXCEPTION_MARKER
public static final MarkerTHROWING_MARKER
public static final MarkerCATCHING_MARKER
public static final Class<? extends MessageFactory > DEFAULT_MESSAGE_FACTORY_CLASS
public AbstractLogger()
public AbstractLogger(Stringname)
name - the logger name
public AbstractLogger(Stringname, MessageFactory messageFactory)
MessageFactory.
name - the logger name
messageFactory - the message factory, if null then use the default message factory.
public static void checkMessageFactory(ExtendedLoggerlogger, MessageFactory messageFactory)
DEFAULT_MESSAGE_FACTORY_CLASS.
logger - The logger to check
messageFactory - The message factory to check.
public void catching(Levellevel, Throwable t)
Logger
protected void catching(Stringfqcn, Level level, Throwable t)
fqcn - The fully qualified class name of the
caller.
level - The logging level.
t - The Throwable.
public void catching(Throwablet)
Logger
main() method), this method is ideal for it.
public void debug(Markermarker, Message msg)
Logger
DEBUG level.
public void debug(Markermarker, Message msg, Throwable t)
Logger
DEBUG level.
public void debug(Markermarker, Object message)
Logger
DEBUG level.
public void debug(Markermarker, Object message, Throwable t)
Logger
public void debug(Markermarker, String message)
Logger
DEBUG level.
public void debug(Markermarker, String message, Object ... params)
Logger
DEBUG level.
debug in interface
Logger
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.
Logger.getMessageFactory()
public void debug(Markermarker, String message, Throwable t)
Logger
public void debug(Messagemsg)
Logger
DEBUG level.
public void debug(Messagemsg, Throwable t)
Logger
DEBUG level.
public void debug(Objectmessage)
Logger
DEBUG level.
public void debug(Stringmessage)
Logger
DEBUG level.
public void debug(Stringmessage, Object ... params)
Logger
DEBUG level.
debug in interface
Logger
message - the message to log; the format depends on the message factory.
params - parameters to the message.
Logger.getMessageFactory()
public void debug(Supplier<?> msgSupplier)
Logger
DEBUG level.
public void debug(Supplier<?> msgSupplier, Throwable t)
Logger
public void debug(Markermarker, Supplier <?> msgSupplier)
Logger
DEBUG level with the specified Marker.
public void debug(Markermarker, String message, Supplier <?>... paramSuppliers)
Logger
DEBUG level.
public void debug(Markermarker, Supplier <?> msgSupplier, Throwable t)
Logger
public void debug(Stringmessage, Supplier <?>... paramSuppliers)
Logger
DEBUG level.
public void debug(Markermarker, MessageSupplier msgSupplier)
Logger
DEBUG level with the specified Marker. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
public void debug(Markermarker, MessageSupplier msgSupplier, Throwable t)
Logger
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.
public void debug(MessageSuppliermsgSupplier)
Logger
DEBUG level. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
public void debug(MessageSuppliermsgSupplier, Throwable t)
Logger
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.
public void entry()
Logger
public void entry(Object... params)
Logger
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.
entry in interface
Logger
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.
protected void entry(Stringfqcn, Object ... params)
fqcn - The fully qualified class name of the
caller.
params - The parameters to the method.
public void error(Markermarker, Message msg)
Logger
ERROR level.
public void error(Markermarker, Message msg, Throwable t)
Logger
ERROR level.
public void error(Markermarker, Object message)
Logger
ERROR level.
public void error(Markermarker, Object message, Throwable t)
Logger
public void error(Markermarker, String message)
Logger
ERROR level.
public void error(Markermarker, String message, Object ... params)
Logger
ERROR level.
error in interface
Logger
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.
public void error(Markermarker, String message, Throwable t)
Logger
public void error(Messagemsg)
Logger
ERROR level.
public void error(Messagemsg, Throwable t)
Logger
ERROR level.
public void error(Objectmessage)
Logger
ERROR level.
public void error(Stringmessage)
Logger
ERROR level.
public void error(Stringmessage, Object ... params)
Logger
ERROR level.
error in interface
Logger
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.
public void error(Supplier<?> msgSupplier)
Logger
ERROR level.
public void error(Supplier<?> msgSupplier, Throwable t)
Logger
public void error(Markermarker, Supplier <?> msgSupplier)
Logger
ERROR level with the specified Marker.
public void error(Markermarker, String message, Supplier <?>... paramSuppliers)
Logger
ERROR level.
public void error(Markermarker, Supplier <?> msgSupplier, Throwable t)
Logger
public void error(Stringmessage, Supplier <?>... paramSuppliers)
Logger
ERROR level.
public void error(Markermarker, MessageSupplier msgSupplier)
Logger
ERROR level with the specified Marker. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
public void error(Markermarker, MessageSupplier msgSupplier, Throwable t)
Logger
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.
public void error(MessageSuppliermsgSupplier)
Logger
ERROR level. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
public void error(MessageSuppliermsgSupplier, Throwable t)
Logger
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.
public void exit()
Logger
public <R> R exit(R result)
Logger
return LOGGER.exit(myResult);
protected <R> R exit(Stringfqcn, R result)
R - The type of the parameter and object being returned.
fqcn - The fully qualified class name of the
caller.
result - The result being returned from the method call.
public void fatal(Markermarker, Message msg)
Logger
FATAL level.
public void fatal(Markermarker, Message msg, Throwable t)
Logger
FATAL level.
public void fatal(Markermarker, Object message)
Logger
FATAL level.
public void fatal(Markermarker, Object message, Throwable t)
Logger
public void fatal(Markermarker, String message)
Logger
FATAL level.
public void fatal(Markermarker, String message, Object ... params)
Logger
FATAL level.
fatal in interface
Logger
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.
public void fatal(Markermarker, String message, Throwable t)
Logger
public void fatal(Messagemsg)
Logger
FATAL level.
public void fatal(Messagemsg, Throwable t)
Logger
FATAL level.
public void fatal(Objectmessage)
Logger
FATAL level.
public void fatal(Stringmessage)
Logger
FATAL level.
public void fatal(Stringmessage, Object ... params)
Logger
FATAL level.
fatal in interface
Logger
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.
public void fatal(Supplier<?> msgSupplier)
Logger
FATAL level.
public void fatal(Supplier<?> msgSupplier, Throwable t)
Logger
public void fatal(Markermarker, Supplier <?> msgSupplier)
Logger
FATAL level with the specified Marker.
public void fatal(Markermarker, String message, Supplier <?>... paramSuppliers)
Logger
FATAL level.
public void fatal(Markermarker, Supplier <?> msgSupplier, Throwable t)
Logger
public void fatal(Stringmessage, Supplier <?>... paramSuppliers)
Logger
FATAL level.
public void fatal(Markermarker, MessageSupplier msgSupplier)
Logger
FATAL level with the specified Marker. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
public void fatal(Markermarker, MessageSupplier msgSupplier, Throwable t)
Logger
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.
public void fatal(MessageSuppliermsgSupplier)
Logger
FATAL level. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
public void fatal(MessageSuppliermsgSupplier, Throwable t)
Logger
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.
public MessageFactorygetMessageFactory()
Logger
getMessageFactory in interface
Logger
public void info(Markermarker, Message msg)
Logger
INFO level.
public void info(Markermarker, Message msg, Throwable t)
Logger
INFO level.
public void info(Markermarker, Object message)
Logger
INFO level.
public void info(Markermarker, Object message, Throwable t)
Logger
public void info(Markermarker, String message)
Logger
INFO level.
public void info(Markermarker, String message, Object ... params)
Logger
INFO level.
info in interface
Logger
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.
public void info(Markermarker, String message, Throwable t)
Logger
public void info(Messagemsg)
Logger
INFO level.
public void info(Messagemsg, Throwable t)
Logger
INFO level.
public void info(Objectmessage)
Logger
INFO level.
public void info(Stringmessage)
Logger
INFO level.
public void info(Stringmessage, Object ... params)
Logger
INFO level.
info in interface
Logger
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.
public void info(Supplier<?> msgSupplier)
Logger
INFO level.
public void info(Supplier<?> msgSupplier, Throwable t)
Logger
public void info(Markermarker, Supplier <?> msgSupplier)
Logger
INFO level with the specified Marker.
public void info(Markermarker, String message, Supplier <?>... paramSuppliers)
Logger
INFO level.
public void info(Markermarker, Supplier <?> msgSupplier, Throwable t)
Logger
public void info(Stringmessage, Supplier <?>... paramSuppliers)
Logger
INFO level.
public void info(Markermarker, MessageSupplier msgSupplier)
Logger
INFO level with the specified Marker. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
public void info(Markermarker, MessageSupplier msgSupplier, Throwable t)
Logger
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.
public void info(MessageSuppliermsgSupplier)
Logger
INFO level. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
public void info(MessageSuppliermsgSupplier, Throwable t)
Logger
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.
public boolean isDebugEnabled()
Logger
DEBUG Level.
isDebugEnabled in interface
Logger
true if this Logger is enabled for level DEBUG,
false otherwise.
public boolean isDebugEnabled(Markermarker)
Logger
DEBUG Level.
isDebugEnabled in interface
Logger
marker - The marker data specific to this log statement.
true if this Logger is enabled for level DEBUG,
false otherwise.
public boolean isEnabled(Levellevel)
Logger
Note that passing in OFF always returns true.
public boolean isEnabled(Levellevel, Marker marker)
Logger
public boolean isErrorEnabled()
Logger
ERROR Level.
isErrorEnabled in interface
Logger
true if this Logger is enabled for level
ERROR,
false otherwise.
public boolean isErrorEnabled(Markermarker)
Logger
ERROR Level.
isErrorEnabled in interface
Logger
marker - The marker data specific to this log statement.
true if this Logger is enabled for level
ERROR,
false otherwise.
public boolean isFatalEnabled()
Logger
FATAL Level.
isFatalEnabled in interface
Logger
true if this Logger is enabled for level
FATAL,
false otherwise.
public boolean isFatalEnabled(Markermarker)
Logger
FATAL Level.
isFatalEnabled in interface
Logger
marker - The marker data specific to this log statement.
true if this Logger is enabled for level
FATAL,
false otherwise.
public boolean isInfoEnabled()
Logger
INFO Level.
isInfoEnabled in interface
Logger
true if this Logger is enabled for level INFO,
false otherwise.
public boolean isInfoEnabled(Markermarker)
Logger
INFO Level.
isInfoEnabled in interface
Logger
marker - The marker data specific to this log statement.
true if this Logger is enabled for level INFO,
false otherwise.
public boolean isTraceEnabled()
Logger
TRACE level.
isTraceEnabled in interface
Logger
true if this Logger is enabled for level TRACE,
false otherwise.
public boolean isTraceEnabled(Markermarker)
Logger
TRACE level.
isTraceEnabled in interface
Logger
marker - The marker data specific to this log statement.
true if this Logger is enabled for level TRACE,
false otherwise.
public boolean isWarnEnabled()
Logger
WARN Level.
isWarnEnabled in interface
Logger
true if this Logger is enabled for level
WARN,
false otherwise.
public boolean isWarnEnabled(Markermarker)
Logger
WARN Level.
isWarnEnabled in interface
Logger
marker - The marker data specific to this log statement.
true if this Logger is enabled for level
WARN,
false otherwise.
public void log(Levellevel, Marker marker, Message msg)
Logger
public void log(Levellevel, Marker marker, Message msg, Throwable t)
Logger
public void log(Levellevel, Marker marker, Object message)
Logger
public void log(Levellevel, Marker marker, Object message, Throwable t)
Logger
Throwable
t passed as parameter.
public void log(Levellevel, Marker marker, String message)
Logger
public void log(Levellevel, Marker marker, String message, Object ... params)
Logger
log in interface
Logger
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.
Logger.getMessageFactory()
public void log(Levellevel, Marker marker, String message, Throwable t)
Logger
Throwable
t passed as parameter.
public void log(Levellevel, Message msg)
Logger
public void log(Levellevel, Message msg, Throwable t)
Logger
public void log(Levellevel, Object message)
Logger
public void log(Levellevel, Object message, Throwable t)
Logger
Throwable
t passed as parameter.
public void log(Levellevel, String message)
Logger
public void log(Levellevel, String message, Object ... params)
Logger
log in interface
Logger
level - the logging level
message - the message to log; the format depends on the message factory.
params - parameters to the message.
Logger.getMessageFactory()
public void log(Levellevel, String message, Throwable t)
Logger
Throwable
t passed as parameter.
public void log(Levellevel, Supplier <?> msgSupplier)
Logger
public void log(Levellevel, Supplier <?> msgSupplier, Throwable t)
Logger
Throwable
t passed as parameter.
public void log(Levellevel, Marker marker, Supplier <?> msgSupplier)
Logger
public void log(Levellevel, Marker marker, String message, Supplier <?>... paramSuppliers)
Logger
log in interface
Logger
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.
public void log(Levellevel, Marker marker, Supplier <?> msgSupplier, Throwable t)
Logger
Throwable
t passed as parameter.
public void log(Levellevel, String message, Supplier <?>... paramSuppliers)
Logger
public void log(Levellevel, Marker marker, MessageSupplier msgSupplier)
Logger
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
public void log(Levellevel, Marker marker, MessageSupplier msgSupplier, Throwable t)
Logger
Throwable
t passed as parameter. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
public void log(Levellevel, MessageSupplier msgSupplier)
Logger
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
public void log(Levellevel, MessageSupplier msgSupplier, Throwable t)
Logger
Throwable
t passed as parameter. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
public void logIfEnabled(Stringfqcn, Level level, Marker marker, Message msg, Throwable t)
ExtendedLogger
logIfEnabled in interface
ExtendedLogger
fqcn - The fully qualified class name of the logger entry point, used to determine the caller class and method when location information needs to be logged.
level - The logging Level to check.
marker - A Marker or null.
msg - The Message.
t - the exception to log, including its stack trace.
public void logIfEnabled(Stringfqcn, Level level, Marker marker, MessageSupplier msgSupplier, Throwable t)
ExtendedLogger
logIfEnabled in interface
ExtendedLogger
fqcn - The fully qualified class name of the logger entry point, used to determine the caller class and method when location information needs to be logged.
level - The logging Level to check.
marker - A Marker or null.
msgSupplier - A function, which when called, produces the desired log message.
t - the exception to log, including its stack trace.
public void logIfEnabled(Stringfqcn, Level level, Marker marker, Object message, Throwable t)
ExtendedLogger
logIfEnabled in interface
ExtendedLogger
fqcn - The fully qualified class name of the logger entry point, used to determine the caller class and method when location information needs to be logged.
level - The logging Level to check.
marker - A Marker or null.
message - The message.
t - the exception to log, including its stack trace.
public void logIfEnabled(Stringfqcn, Level level, Marker marker, Supplier <?> msgSupplier, Throwable t)
ExtendedLogger
logIfEnabled in interface
ExtendedLogger
fqcn - The fully qualified class name of the logger entry point, used to determine the caller class and method when location information needs to be logged.
level - The logging Level to check.
marker - A Marker or null.
msgSupplier - A function, which when called, produces the desired log message.
t - the exception to log, including its stack trace.
public void logIfEnabled(Stringfqcn, Level level, Marker marker, String message)
ExtendedLogger
logIfEnabled in interface
ExtendedLogger
fqcn - The fully qualified class name of the logger entry point, used to determine the caller class and method when location information needs to be logged.
level - The logging Level to check.
marker - A Marker or null.
message - The message.
public void logIfEnabled(Stringfqcn, Level level, Marker marker, String message, Supplier <?>... paramSuppliers)
ExtendedLogger
logIfEnabled in interface
ExtendedLogger
fqcn - The fully qualified class name of the logger entry point, used to determine the caller class and method when location information needs to be logged.
level - The logging Level to check.
marker - A Marker or null.
message - The message format.
paramSuppliers - An array of functions, which when called, produce the desired log message parameters.
public void logIfEnabled(Stringfqcn, Level level, Marker marker, String message, Object ... params)
ExtendedLogger
logIfEnabled in interface
ExtendedLogger
fqcn - The fully qualified class name of the logger entry point, used to determine the caller class and method when location information needs to be logged.
level - The logging Level to check.
marker - A Marker or null.
message - The message format.
params - The message parameters.
public void logIfEnabled(Stringfqcn, Level level, Marker marker, String message, Throwable t)
ExtendedLogger
logIfEnabled in interface
ExtendedLogger
fqcn - The fully qualified class name of the logger entry point, used to determine the caller class and method when location information needs to be logged.
level - The logging Level to check.
marker - A Marker or null.
message - The message.
t - the exception to log, including its stack trace.
protected void logMessage(Stringfqcn, Level level, Marker marker, Object message, Throwable t)
protected void logMessage(Stringfqcn, Level level, Marker marker, MessageSupplier msgSupplier, Throwable t)
protected void logMessage(Stringfqcn, Level level, Marker marker, Supplier <?> msgSupplier, Throwable t)
protected void logMessage(Stringfqcn, Level level, Marker marker, String message, Throwable t)
protected void logMessage(Stringfqcn, Level level, Marker marker, String message, Object ... params)
protected void logMessage(Stringfqcn, Level level, Marker marker, String message, Supplier <?>... paramSuppliers)
public void printf(Levellevel, Marker marker, String format, Object ... params)
Logger
public void printf(Levellevel, String format, Object ... params)
Logger
public <T extends Throwable> T throwing(T t)
Logger
throw logger.throwing(myException);
public <T extends Throwable> T throwing(Level level, T t)
Logger
throw logger.throwing(Level.DEBUG, myException);
protected <T extends Throwable> T throwing(String fqcn, Level level, T t)
T - the type of the Throwable.
fqcn - the fully qualified class name of this Logger implementation.
level - The logging Level.
t - The Throwable.
public void trace(Markermarker, Message msg)
Logger
TRACE level.
public void trace(Markermarker, Message msg, Throwable t)
Logger
TRACE level.
public void trace(Markermarker, Object message)
Logger
TRACE level.
public void trace(Markermarker, Object message, Throwable t)
Logger
trace in interface
Logger
marker - the marker data specific to this log statement
message - the message object to log.
t - the exception to log, including its stack trace.
Logger.debug(String)
public void trace(Markermarker, String message)
Logger
TRACE level.
public void trace(Markermarker, String message, Object ... params)
Logger
TRACE level.
trace in interface
Logger
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.
Logger.getMessageFactory()
public void trace(Markermarker, String message, Throwable t)
Logger
trace in interface
Logger
marker - the marker data specific to this log statement
message - the message object to log.
t - the exception to log, including its stack trace.
Logger.debug(String)
public void trace(Messagemsg)
Logger
TRACE level.
public void trace(Messagemsg, Throwable t)
Logger
TRACE level.
public void trace(Objectmessage)
Logger
TRACE level.
public void trace(Objectmessage, Throwable t)
Logger
trace in interface
Logger
message - the message object to log.
t - the exception to log, including its stack trace.
Logger.debug(String)
public void trace(Stringmessage)
Logger
TRACE level.
public void trace(Stringmessage, Object ... params)
Logger
TRACE level.
trace in interface
Logger
message - the message to log; the format depends on the message factory.
params - parameters to the message.
Logger.getMessageFactory()
public void trace(Stringmessage, Throwable t)
Logger
trace in interface
Logger
message - the message object to log.
t - the exception to log, including its stack trace.
Logger.debug(String)
public void trace(Supplier<?> msgSupplier)
Logger
TRACE level.
public void trace(Supplier<?> msgSupplier, Throwable t)
Logger
public void trace(Markermarker, Supplier <?> msgSupplier)
Logger
TRACE level with the specified Marker.
public void trace(Markermarker, String message, Supplier <?>... paramSuppliers)
Logger
TRACE level.
public void trace(Markermarker, Supplier <?> msgSupplier, Throwable t)
Logger
public void trace(Stringmessage, Supplier <?>... paramSuppliers)
Logger
TRACE level.
public void trace(Markermarker, MessageSupplier msgSupplier)
Logger
TRACE level with the specified Marker. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
public void trace(Markermarker, MessageSupplier msgSupplier, Throwable t)
Logger
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.
public void trace(MessageSuppliermsgSupplier)
Logger
TRACE level. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
public void trace(MessageSuppliermsgSupplier, Throwable t)
Logger
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.
public void warn(Markermarker, Message msg)
Logger
WARN level.
public void warn(Markermarker, Message msg, Throwable t)
Logger
WARN level.
public void warn(Markermarker, Object message)
Logger
WARN level.
public void warn(Markermarker, Object message, Throwable t)
Logger
public void warn(Markermarker, String message)
Logger
WARN level.
public void warn(Markermarker, String message, Object ... params)
Logger
WARN level.
warn in interface
Logger
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.
public void warn(Markermarker, String message, Throwable t)
Logger
public void warn(Messagemsg)
Logger
WARN level.
public void warn(Messagemsg, Throwable t)
Logger
WARN level.
public void warn(Objectmessage)
Logger
WARN level.
public void warn(Stringmessage)
Logger
WARN level.
public void warn(Stringmessage, Object ... params)
Logger
WARN level.
warn in interface
Logger
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.
public void warn(Supplier<?> msgSupplier)
Logger
WARN level.
public void warn(Supplier<?> msgSupplier, Throwable t)
Logger
public void warn(Markermarker, Supplier <?> msgSupplier)
Logger
WARN level with the specified Marker.
public void warn(Markermarker, String message, Supplier <?>... paramSuppliers)
Logger
WARN level.
public void warn(Markermarker, Supplier <?> msgSupplier, Throwable t)
Logger
public void warn(Stringmessage, Supplier <?>... paramSuppliers)
Logger
WARN level.
public void warn(Markermarker, MessageSupplier msgSupplier)
Logger
WARN level with the specified Marker. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
public void warn(Markermarker, MessageSupplier msgSupplier, Throwable t)
Logger
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.
public void warn(MessageSuppliermsgSupplier)
Logger
WARN level. The
MessageSupplier may or may not use the
MessageFactory to construct the
Message.
public void warn(MessageSuppliermsgSupplier, Throwable t)
Logger
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.