Package cn.sliew.milky.log
Class Log4J2Logger
- java.lang.Object
-
- org.apache.logging.log4j.spi.AbstractLogger
-
- org.apache.logging.log4j.spi.ExtendedLoggerWrapper
-
- cn.sliew.milky.log.Log4J2Logger
-
- All Implemented Interfaces:
Logger,Serializable,org.apache.logging.log4j.Logger,org.apache.logging.log4j.spi.ExtendedLogger,org.apache.logging.log4j.spi.LocationAwareLogger
public class Log4J2Logger extends org.apache.logging.log4j.spi.ExtendedLoggerWrapper implements Logger
Logger implementaion by Log4j2.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddebug(Throwable t)Log an exception (throwable) at the DEBUG level.voiderror(Throwable t)Log an exception (throwable) at the ERROR level.voidinfo(Throwable t)Log an exception (throwable) at the INFO level.booleanisEnabled(LogLevel level)Whether the logger instance enabled for the specifiedlevel.voidlog(LogLevel level, String msg)Log a message at the specifiedlevel.voidlog(LogLevel level, String format, Object arg)Log a message at the specifiedlevelaccording to the specified format and argument.voidlog(LogLevel level, String format, Object... arguments)Log a message at the specifiedlevelaccording to the specified format and arguments.voidlog(LogLevel level, String format, Object argA, Object argB)Log a message at the specifiedlevelaccording to the specified format and arguments.voidlog(LogLevel level, String msg, Throwable t)Log an exception (throwable) at the specifiedlevelwith an accompanying message.voidlog(LogLevel level, Throwable t)Log an exception (throwable) at the specifiedlevel.Stringname()Return the name of thisLoggerinstance.voidtrace(Throwable t)Log an exception (throwable) at the TRACE level.voidwarn(Throwable t)Log an exception (throwable) at the WARN level.-
Methods inherited from class org.apache.logging.log4j.spi.ExtendedLoggerWrapper
getLevel, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, logMessage
-
Methods inherited from class org.apache.logging.log4j.spi.AbstractLogger
always, atDebug, atError, atFatal, atInfo, atLevel, atTrace, atWarn, catching, 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, getFlowMessageFactory, getLogBuilder, getMessageFactory, getName, getRecursionDepth, 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, 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, logMessage, printf, printf, requiresLocation, 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, warn
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cn.sliew.milky.log.Logger
debug, debug, debug, debug, debug, error, error, error, error, error, info, info, info, info, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, trace, trace, trace, trace, trace, warn, warn, warn, warn, warn
-
-
-
-
Method Detail
-
name
public String name()
Description copied from interface:LoggerReturn the name of thisLoggerinstance.
-
trace
public void trace(Throwable t)
Description copied from interface:LoggerLog an exception (throwable) at the TRACE level.
-
debug
public void debug(Throwable t)
Description copied from interface:LoggerLog an exception (throwable) at the DEBUG level.
-
info
public void info(Throwable t)
Description copied from interface:LoggerLog an exception (throwable) at the INFO level.
-
warn
public void warn(Throwable t)
Description copied from interface:LoggerLog an exception (throwable) at the WARN level.
-
error
public void error(Throwable t)
Description copied from interface:LoggerLog an exception (throwable) at the ERROR level.
-
isEnabled
public boolean isEnabled(LogLevel level)
Description copied from interface:LoggerWhether the logger instance enabled for the specifiedlevel.
-
log
public void log(LogLevel level, String msg)
Description copied from interface:LoggerLog a message at the specifiedlevel.
-
log
public void log(LogLevel level, String format, Object arg)
Description copied from interface:LoggerLog a message at the specifiedlevelaccording to the specified format and argument.This form avoids superfluous object creation when the logger is disabled for the specified
level.
-
log
public void log(LogLevel level, String format, Object argA, Object argB)
Description copied from interface:LoggerLog a message at the specifiedlevelaccording to the specified format and arguments.This form avoids superfluous object creation when the logger is disabled for the specified
level.
-
log
public void log(LogLevel level, String format, Object... arguments)
Description copied from interface:LoggerLog a message at the specifiedlevelaccording 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 anObject[]before invoking the method, even if this logger is disabled for the specifiedlevel. The variants takingoneandtwoarguments exist solely in order to avoid this hidden cost.
-
log
public void log(LogLevel level, String msg, Throwable t)
Description copied from interface:LoggerLog an exception (throwable) at the specifiedlevelwith an accompanying message.
-
-