类 Log4J2Logger

  • 所有已实现的接口:
    Logger, Serializable, org.apache.logging.log4j.Logger, org.apache.logging.log4j.spi.ExtendedLogger

    public class Log4J2Logger
    extends org.apache.logging.log4j.spi.ExtendedLoggerWrapper
    implements Logger
    Logger implementaion by Log4j2.
    另请参阅:
    序列化表格
    • 字段概要

      • 从类继承的字段 org.apache.logging.log4j.spi.ExtendedLoggerWrapper

        logger
      • 从类继承的字段 org.apache.logging.log4j.spi.AbstractLogger

        CATCHING_MARKER, DEFAULT_FLOW_MESSAGE_FACTORY_CLASS, DEFAULT_MESSAGE_FACTORY_CLASS, ENTRY_MARKER, EXCEPTION_MARKER, EXIT_MARKER, FLOW_MARKER, name, THROWING_MARKER
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      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 arg)
      Log a message at the specified level according to the specified format and argument.
      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 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.
      • 从类继承的方法 org.apache.logging.log4j.spi.ExtendedLoggerWrapper

        getLevel, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, logMessage
      • 从类继承的方法 org.apache.logging.log4j.spi.AbstractLogger

        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, 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, warn
    • 方法详细资料

      • name

        public String name()
        从接口复制的说明: Logger
        Return the name of this Logger instance.
        指定者:
        name 在接口中 Logger
        返回:
        name of this logger instance
      • trace

        public void trace​(Throwable t)
        从接口复制的说明: Logger
        Log an exception (throwable) at the TRACE level.
        指定者:
        trace 在接口中 Logger
        参数:
        t - the exception (throwable) to log
      • debug

        public void debug​(Throwable t)
        从接口复制的说明: Logger
        Log an exception (throwable) at the DEBUG level.
        指定者:
        debug 在接口中 Logger
        参数:
        t - the exception (throwable) to log
      • info

        public void info​(Throwable t)
        从接口复制的说明: Logger
        Log an exception (throwable) at the INFO level.
        指定者:
        info 在接口中 Logger
        参数:
        t - the exception (throwable) to log
      • warn

        public void warn​(Throwable t)
        从接口复制的说明: Logger
        Log an exception (throwable) at the WARN level.
        指定者:
        warn 在接口中 Logger
        参数:
        t - the exception (throwable) to log
      • error

        public void error​(Throwable t)
        从接口复制的说明: Logger
        Log an exception (throwable) at the ERROR level.
        指定者:
        error 在接口中 Logger
        参数:
        t - the exception (throwable) to log
      • isEnabled

        public boolean isEnabled​(LogLevel level)
        从接口复制的说明: Logger
        Whether the logger instance enabled for the specified level.
        指定者:
        isEnabled 在接口中 Logger
        返回:
        True if this Logger is enabled for the specified level, false otherwise.
      • log

        public void log​(LogLevel level,
                        String msg)
        从接口复制的说明: Logger
        Log a message at the specified level.
        指定者:
        log 在接口中 Logger
        msg - the message string to be logged
      • log

        public void log​(LogLevel level,
                        String format,
                        Object arg)
        从接口复制的说明: Logger
        Log a message at the specified level according to the specified format and argument.

        This form avoids superfluous object creation when the logger is disabled for the specified level.

        指定者:
        log 在接口中 Logger
        format - the format string
        arg - the argument
      • log

        public void log​(LogLevel level,
                        String format,
                        Object argA,
                        Object argB)
        从接口复制的说明: Logger
        Log a message at the specified level according to the specified format and arguments.

        This form avoids superfluous object creation when the logger is disabled for the specified level.

        指定者:
        log 在接口中 Logger
        format - the format string
        argA - the first argument
        argB - the second argument
      • log

        public void log​(LogLevel level,
                        String format,
                        Object... arguments)
        从接口复制的说明: Logger
        Log a message at the specified level 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.

        指定者:
        log 在接口中 Logger
        format - the format string
        arguments - a list of 3 or more arguments
      • log

        public void log​(LogLevel level,
                        String msg,
                        Throwable t)
        从接口复制的说明: Logger
        Log an exception (throwable) at the specified level with an accompanying message.
        指定者:
        log 在接口中 Logger
        msg - the message accompanying the exception
        t - the exception (throwable) to log
      • log

        public void log​(LogLevel level,
                        Throwable t)
        从接口复制的说明: Logger
        Log an exception (throwable) at the specified level.
        指定者:
        log 在接口中 Logger
        t - the exception (throwable) to log