Class RememberingLogger

  • All Implemented Interfaces:
    org.slf4j.Logger

    public class RememberingLogger
    extends Object
    A slf4j logger implementation which remembers log events. This class is thread-safe.
    Author:
    Michael Vorburger.ch
    • Method Detail

      • getErrorLogCaptures

        public static com.google.common.collect.ImmutableList<LogCapture> getErrorLogCaptures()
      • getLastErrorMessage

        public static Optional<String> getLastErrorMessage()
      • getErrorMessage

        public static Optional<String> getErrorMessage​(int howManyMessagesBack)
      • getErrorThrowable

        public static Optional<Throwable> getErrorThrowable​(int howManyMessagesBack)
      • resetLastError

        public static void resetLastError()
      • error

        public void error​(String msg)
        Specified by:
        error in interface org.slf4j.Logger
      • error

        public void error​(String format,
                          Object arg)
        Specified by:
        error in interface org.slf4j.Logger
      • error

        public void error​(String format,
                          Object arg1,
                          Object arg2)
        Specified by:
        error in interface org.slf4j.Logger
      • error

        public void error​(String format,
                          Object... arguments)
        Specified by:
        error in interface org.slf4j.Logger
      • error

        public void error​(String msg,
                          Throwable throwable)
        Specified by:
        error in interface org.slf4j.Logger
      • error

        public void error​(org.slf4j.Marker marker,
                          String msg)
        Specified by:
        error in interface org.slf4j.Logger
      • error

        public void error​(org.slf4j.Marker marker,
                          String format,
                          Object arg)
        Specified by:
        error in interface org.slf4j.Logger
      • error

        public void error​(org.slf4j.Marker marker,
                          String format,
                          Object arg1,
                          Object arg2)
        Specified by:
        error in interface org.slf4j.Logger
      • error

        public void error​(org.slf4j.Marker marker,
                          String format,
                          Object... arguments)
        Specified by:
        error in interface org.slf4j.Logger
      • error

        public void error​(org.slf4j.Marker marker,
                          String msg,
                          Throwable throwable)
        Specified by:
        error in interface org.slf4j.Logger
      • getName

        public String getName()
        Specified by:
        getName in interface org.slf4j.Logger
      • isTraceEnabled

        public boolean isTraceEnabled()
        Specified by:
        isTraceEnabled in interface org.slf4j.Logger
      • isTraceEnabled

        public boolean isTraceEnabled​(org.slf4j.Marker marker)
        Specified by:
        isTraceEnabled in interface org.slf4j.Logger
      • trace

        public void trace​(String msg)
        Specified by:
        trace in interface org.slf4j.Logger
      • trace

        public void trace​(String format,
                          Object arg)
        Specified by:
        trace in interface org.slf4j.Logger
      • trace

        public void trace​(String format,
                          Object arg1,
                          Object arg2)
        Specified by:
        trace in interface org.slf4j.Logger
      • trace

        public void trace​(String format,
                          Object... arguments)
        Specified by:
        trace in interface org.slf4j.Logger
      • trace

        public void trace​(String msg,
                          Throwable throwable)
        Specified by:
        trace in interface org.slf4j.Logger
      • trace

        public void trace​(org.slf4j.Marker marker,
                          String msg)
        Specified by:
        trace in interface org.slf4j.Logger
      • trace

        public void trace​(org.slf4j.Marker marker,
                          String format,
                          Object arg)
        Specified by:
        trace in interface org.slf4j.Logger
      • trace

        public void trace​(org.slf4j.Marker marker,
                          String format,
                          Object arg1,
                          Object arg2)
        Specified by:
        trace in interface org.slf4j.Logger
      • trace

        public void trace​(org.slf4j.Marker marker,
                          String format,
                          Object... argArray)
        Specified by:
        trace in interface org.slf4j.Logger
      • trace

        public void trace​(org.slf4j.Marker marker,
                          String msg,
                          Throwable throwable)
        Specified by:
        trace in interface org.slf4j.Logger
      • isDebugEnabled

        public boolean isDebugEnabled()
        Specified by:
        isDebugEnabled in interface org.slf4j.Logger
      • isDebugEnabled

        public boolean isDebugEnabled​(org.slf4j.Marker marker)
        Specified by:
        isDebugEnabled in interface org.slf4j.Logger
      • debug

        public void debug​(String msg)
        Specified by:
        debug in interface org.slf4j.Logger
      • debug

        public void debug​(String format,
                          Object arg)
        Specified by:
        debug in interface org.slf4j.Logger
      • debug

        public void debug​(String format,
                          Object arg1,
                          Object arg2)
        Specified by:
        debug in interface org.slf4j.Logger
      • debug

        public void debug​(String format,
                          Object... arguments)
        Specified by:
        debug in interface org.slf4j.Logger
      • debug

        public void debug​(String msg,
                          Throwable throwable)
        Specified by:
        debug in interface org.slf4j.Logger
      • debug

        public void debug​(org.slf4j.Marker marker,
                          String msg)
        Specified by:
        debug in interface org.slf4j.Logger
      • debug

        public void debug​(org.slf4j.Marker marker,
                          String format,
                          Object arg)
        Specified by:
        debug in interface org.slf4j.Logger
      • debug

        public void debug​(org.slf4j.Marker marker,
                          String format,
                          Object arg1,
                          Object arg2)
        Specified by:
        debug in interface org.slf4j.Logger
      • debug

        public void debug​(org.slf4j.Marker marker,
                          String format,
                          Object... arguments)
        Specified by:
        debug in interface org.slf4j.Logger
      • debug

        public void debug​(org.slf4j.Marker marker,
                          String msg,
                          Throwable throwable)
        Specified by:
        debug in interface org.slf4j.Logger
      • isInfoEnabled

        public boolean isInfoEnabled()
        Specified by:
        isInfoEnabled in interface org.slf4j.Logger
      • isInfoEnabled

        public boolean isInfoEnabled​(org.slf4j.Marker marker)
        Specified by:
        isInfoEnabled in interface org.slf4j.Logger
      • info

        public void info​(String msg)
        Specified by:
        info in interface org.slf4j.Logger
      • info

        public void info​(String format,
                         Object arg)
        Specified by:
        info in interface org.slf4j.Logger
      • info

        public void info​(String format,
                         Object arg1,
                         Object arg2)
        Specified by:
        info in interface org.slf4j.Logger
      • info

        public void info​(String format,
                         Object... arguments)
        Specified by:
        info in interface org.slf4j.Logger
      • info

        public void info​(String msg,
                         Throwable throwable)
        Specified by:
        info in interface org.slf4j.Logger
      • info

        public void info​(org.slf4j.Marker marker,
                         String msg)
        Specified by:
        info in interface org.slf4j.Logger
      • info

        public void info​(org.slf4j.Marker marker,
                         String format,
                         Object arg)
        Specified by:
        info in interface org.slf4j.Logger
      • info

        public void info​(org.slf4j.Marker marker,
                         String format,
                         Object arg1,
                         Object arg2)
        Specified by:
        info in interface org.slf4j.Logger
      • info

        public void info​(org.slf4j.Marker marker,
                         String format,
                         Object... arguments)
        Specified by:
        info in interface org.slf4j.Logger
      • info

        public void info​(org.slf4j.Marker marker,
                         String msg,
                         Throwable throwable)
        Specified by:
        info in interface org.slf4j.Logger
      • isWarnEnabled

        public boolean isWarnEnabled()
        Specified by:
        isWarnEnabled in interface org.slf4j.Logger
      • isWarnEnabled

        public boolean isWarnEnabled​(org.slf4j.Marker marker)
        Specified by:
        isWarnEnabled in interface org.slf4j.Logger
      • warn

        public void warn​(String msg)
        Specified by:
        warn in interface org.slf4j.Logger
      • warn

        public void warn​(String format,
                         Object arg)
        Specified by:
        warn in interface org.slf4j.Logger
      • warn

        public void warn​(String format,
                         Object... arguments)
        Specified by:
        warn in interface org.slf4j.Logger
      • warn

        public void warn​(String format,
                         Object arg1,
                         Object arg2)
        Specified by:
        warn in interface org.slf4j.Logger
      • warn

        public void warn​(String msg,
                         Throwable throwable)
        Specified by:
        warn in interface org.slf4j.Logger
      • warn

        public void warn​(org.slf4j.Marker marker,
                         String msg)
        Specified by:
        warn in interface org.slf4j.Logger
      • warn

        public void warn​(org.slf4j.Marker marker,
                         String format,
                         Object arg)
        Specified by:
        warn in interface org.slf4j.Logger
      • warn

        public void warn​(org.slf4j.Marker marker,
                         String format,
                         Object arg1,
                         Object arg2)
        Specified by:
        warn in interface org.slf4j.Logger
      • warn

        public void warn​(org.slf4j.Marker marker,
                         String format,
                         Object... arguments)
        Specified by:
        warn in interface org.slf4j.Logger
      • warn

        public void warn​(org.slf4j.Marker marker,
                         String msg,
                         Throwable throwable)
        Specified by:
        warn in interface org.slf4j.Logger
      • isErrorEnabled

        public boolean isErrorEnabled()
        Specified by:
        isErrorEnabled in interface org.slf4j.Logger
      • isErrorEnabled

        public boolean isErrorEnabled​(org.slf4j.Marker marker)
        Specified by:
        isErrorEnabled in interface org.slf4j.Logger