类 LogAccessor


  • public class LogAccessor
    extends Object
    A convenient accessor for Commons Logging, providing not only CharSequence based log methods but also Supplier based variants for use with Java 8 lambda expressions.
    从以下版本开始:
    5.2
    作者:
    Juergen Hoeller
    • 方法详细资料

      • getLog

        public final Log getLog()
        Return the target Commons Log.
      • isFatalEnabled

        public boolean isFatalEnabled()
        Is fatal logging currently enabled?
      • isErrorEnabled

        public boolean isErrorEnabled()
        Is error logging currently enabled?
      • isWarnEnabled

        public boolean isWarnEnabled()
        Is warn logging currently enabled?
      • isInfoEnabled

        public boolean isInfoEnabled()
        Is info logging currently enabled?
      • isDebugEnabled

        public boolean isDebugEnabled()
        Is debug logging currently enabled?
      • isTraceEnabled

        public boolean isTraceEnabled()
        Is trace logging currently enabled?
      • fatal

        public void fatal​(CharSequence message)
        Log a message with fatal log level.
        参数:
        message - the message to log
      • fatal

        public void fatal​(Throwable cause,
                          CharSequence message)
        Log an error with fatal log level.
        参数:
        cause - the exception to log
        message - the message to log
      • error

        public void error​(CharSequence message)
        Log a message with error log level.
        参数:
        message - the message to log
      • error

        public void error​(Throwable cause,
                          CharSequence message)
        Log an error with error log level.
        参数:
        cause - the exception to log
        message - the message to log
      • warn

        public void warn​(CharSequence message)
        Log a message with warn log level.
        参数:
        message - the message to log
      • warn

        public void warn​(Throwable cause,
                         CharSequence message)
        Log an error with warn log level.
        参数:
        cause - the exception to log
        message - the message to log
      • info

        public void info​(CharSequence message)
        Log a message with info log level.
        参数:
        message - the message to log
      • info

        public void info​(Throwable cause,
                         CharSequence message)
        Log an error with info log level.
        参数:
        cause - the exception to log
        message - the message to log
      • debug

        public void debug​(CharSequence message)
        Log a message with debug log level.
        参数:
        message - the message to log
      • debug

        public void debug​(Throwable cause,
                          CharSequence message)
        Log an error with debug log level.
        参数:
        cause - the exception to log
        message - the message to log
      • trace

        public void trace​(CharSequence message)
        Log a message with trace log level.
        参数:
        message - the message to log
      • trace

        public void trace​(Throwable cause,
                          CharSequence message)
        Log an error with trace log level.
        参数:
        cause - the exception to log
        message - the message to log
      • fatal

        public void fatal​(Supplier<? extends CharSequence> messageSupplier)
        Log a message with fatal log level.
        参数:
        messageSupplier - a lazy supplier for the message to log
      • fatal

        public void fatal​(Throwable cause,
                          Supplier<? extends CharSequence> messageSupplier)
        Log an error with fatal log level.
        参数:
        cause - the exception to log
        messageSupplier - a lazy supplier for the message to log
      • error

        public void error​(Supplier<? extends CharSequence> messageSupplier)
        Log a message with error log level.
        参数:
        messageSupplier - a lazy supplier for the message to log
      • error

        public void error​(Throwable cause,
                          Supplier<? extends CharSequence> messageSupplier)
        Log an error with error log level.
        参数:
        cause - the exception to log
        messageSupplier - a lazy supplier for the message to log
      • warn

        public void warn​(Supplier<? extends CharSequence> messageSupplier)
        Log a message with warn log level.
        参数:
        messageSupplier - a lazy supplier for the message to log
      • warn

        public void warn​(Throwable cause,
                         Supplier<? extends CharSequence> messageSupplier)
        Log an error with warn log level.
        参数:
        cause - the exception to log
        messageSupplier - a lazy supplier for the message to log
      • info

        public void info​(Supplier<? extends CharSequence> messageSupplier)
        Log a message with info log level.
        参数:
        messageSupplier - a lazy supplier for the message to log
      • info

        public void info​(Throwable cause,
                         Supplier<? extends CharSequence> messageSupplier)
        Log an error with info log level.
        参数:
        cause - the exception to log
        messageSupplier - a lazy supplier for the message to log
      • debug

        public void debug​(Supplier<? extends CharSequence> messageSupplier)
        Log a message with debug log level.
        参数:
        messageSupplier - a lazy supplier for the message to log
      • debug

        public void debug​(Throwable cause,
                          Supplier<? extends CharSequence> messageSupplier)
        Log an error with debug log level.
        参数:
        cause - the exception to log
        messageSupplier - a lazy supplier for the message to log
      • trace

        public void trace​(Supplier<? extends CharSequence> messageSupplier)
        Log a message with trace log level.
        参数:
        messageSupplier - a lazy supplier for the message to log
      • trace

        public void trace​(Throwable cause,
                          Supplier<? extends CharSequence> messageSupplier)
        Log an error with trace log level.
        参数:
        cause - the exception to log
        messageSupplier - a lazy supplier for the message to log