public class Log4J2Logger extends org.apache.logging.log4j.spi.ExtendedLoggerWrapper implements Logger
| 限定符和类型 | 方法和说明 |
|---|---|
void |
debug(Throwable t)
Log an exception (throwable) at the DEBUG level.
|
void |
error(Throwable t)
Log an exception (throwable) at the ERROR level.
|
void |
info(Throwable t)
Log an exception (throwable) at the INFO level.
|
boolean |
isEnabled(LogLevel level)
Whether the logger instance enabled for the specified
level. |
void |
log(LogLevel level,
String msg)
Log a message at the specified
level. |
void |
log(LogLevel level,
String format,
Object... arguments)
Log a message at the specified
level according to the specified format
and arguments. |
void |
log(LogLevel level,
String format,
Object arg)
Log a message at the specified
level according to the specified format
and argument. |
void |
log(LogLevel level,
String format,
Object argA,
Object argB)
Log a message at the specified
level according to the specified format
and arguments. |
void |
log(LogLevel level,
String msg,
Throwable t)
Log an exception (throwable) at the specified
level with an
accompanying message. |
void |
log(LogLevel level,
Throwable t)
Log an exception (throwable) at the specified
level. |
String |
name()
Return the name of this
Logger instance. |
void |
trace(Throwable t)
Log an exception (throwable) at the TRACE level.
|
void |
warn(Throwable t)
Log an exception (throwable) at the WARN level.
|
getLevel, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, logMessagecatching, catching, catching, catchingMsg, checkMessageFactory, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, enter, enter, enter, enter, enter, entry, entry, entry, entryMsg, entryMsg, entryMsg, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, exit, exit, exit, exit, exitMsg, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, getMessageFactory, getName, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, isDebugEnabled, isDebugEnabled, isEnabled, isEnabled, isErrorEnabled, isErrorEnabled, isFatalEnabled, isFatalEnabled, isInfoEnabled, isInfoEnabled, isTraceEnabled, isTraceEnabled, isWarnEnabled, isWarnEnabled, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, printf, printf, throwing, throwing, throwing, throwingMsg, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, traceEntry, traceEntry, traceEntry, traceEntry, traceEntry, traceExit, traceExit, traceExit, traceExit, traceExit, traceExit, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warnpublic String name()
LoggerLogger instance.public void trace(Throwable t)
Loggert - the exception (throwable) to logpublic void debug(Throwable t)
Loggert - the exception (throwable) to logpublic void info(Throwable t)
Loggert - the exception (throwable) to logpublic void warn(Throwable t)
Loggert - the exception (throwable) to logpublic void error(Throwable t)
Loggert - the exception (throwable) to logpublic boolean isEnabled(LogLevel level)
Loggerlevel.level, false otherwise.public void log(LogLevel level, String msg)
Loggerlevel.msg - the message string to be loggedpublic void log(LogLevel level, String format, Object arg)
Loggerlevel according to the specified format
and argument.
This form avoids superfluous object creation when the logger
is disabled for the specified level.
format - the format stringarg - the argumentpublic void log(LogLevel level, String format, Object argA, Object argB)
Loggerlevel according to the specified format
and arguments.
This form avoids superfluous object creation when the logger
is disabled for the specified level.
format - the format stringargA - the first argumentargB - the second argumentpublic void log(LogLevel level, String format, Object... arguments)
Loggerlevel according to the specified format
and arguments.
This form avoids superfluous string concatenation when the logger
is disabled for the specified level. However, this variant incurs the hidden
(and relatively small) cost of creating an Object[] before invoking the method,
even if this logger is disabled for the specified level. The variants taking
one and
two arguments exist solely
in order to avoid this hidden cost.
format - the format stringarguments - a list of 3 or more argumentspublic void log(LogLevel level, String msg, Throwable t)
Loggerlevel with an
accompanying message.msg - the message accompanying the exceptiont - the exception (throwable) to logCopyright © 2021. All rights reserved.