Class LogQueue

    • Constructor Detail

      • LogQueue

        public LogQueue()
    • Method Detail

      • log

        public void log​(org.slf4j.Logger targetLogger)
        Copy the stored log into a passed Logger.
        Specified by:
        log in interface LogTail
        Parameters:
        targetLogger - the logger where to copy the stored log
        Since:
        5.3M1
      • addLogEvent

        public LogEvent addLogEvent​(LogLevel level,
                                    String format,
                                    Object[] arguments)
        Parameters:
        level - the log level
        format - the log message
        arguments - the event arguments to insert in the message
        Returns:
        the created LogEvent instance
        Since:
        4.1RC1
      • addLogEvent

        public LogEvent addLogEvent​(org.slf4j.Marker marker,
                                    LogLevel level,
                                    String format,
                                    Object[] arguments)
        Parameters:
        marker - the log marker
        level - the log level
        format - the log message
        arguments - the event arguments to insert in the message
        Returns:
        the created LogEvent instance
        Since:
        4.3M1
      • addLogEvent

        public LogEvent addLogEvent​(LogLevel level,
                                    String format,
                                    Object[] arguments,
                                    Throwable throwable)
        Parameters:
        level - the log level
        format - the log message
        arguments - the event arguments to insert in the message
        throwable - the throwable associated to the event
        Returns:
        the created LogEvent instance
        Since:
        4.1RC1
      • addLogEvent

        public LogEvent addLogEvent​(org.slf4j.Marker marker,
                                    LogLevel level,
                                    String format,
                                    Object[] arguments,
                                    Throwable throwable)
        Parameters:
        marker - the log marker
        level - the log level
        format - the log message
        arguments - the event arguments to insert in the message
        throwable - the throwable associated to the event
        Returns:
        the created LogEvent instance
        Since:
        4.3M1
      • log

        public void log​(LogEvent logEvent)
        Specified by:
        log in interface Logger
        Parameters:
        logEvent - the log event
      • getLogEvent

        public LogEvent getLogEvent​(int index)
        Specified by:
        getLogEvent in interface LogTail
        Parameters:
        index - the index of the log event
        Returns:
        the log event associated with the passed index or null if it does not exist
      • getFirstLogEvent

        public LogEvent getFirstLogEvent​(LogLevel from)
        Specified by:
        getFirstLogEvent in interface LogTail
        Parameters:
        from - the log level from which to select log events
        Returns:
        the first log event with passed level or more
      • getLastLogEvent

        public LogEvent getLastLogEvent​(LogLevel from)
        Specified by:
        getLastLogEvent in interface LogTail
        Parameters:
        from - the log level from which to select log events
        Returns:
        the last log event with passed level or more
      • getLogEvents

        public LogTailResult getLogEvents​(LogLevel from,
                                          int offset,
                                          int limit)
        Specified by:
        getLogEvents in interface LogTail
        Parameters:
        from - the log level from which to select log events
        offset - the offset where to start searching for the log events
        limit - the maximum number of results to return
        Returns:
        the log events with the passed level or more
      • hasLogLevel

        public boolean hasLogLevel​(LogLevel from)
        Specified by:
        hasLogLevel in interface LogTail
        Parameters:
        from - the log level from which to select log events
        Returns:
        true if a log event with the passed log level or more was found
      • getLogs

        public List<LogEvent> getLogs​(LogLevel level)
        Filter logs of a specific level.
        Parameters:
        level - the level of the logs to return
        Returns:
        the filtered logs
        Since:
        4.1RC1
      • getLogsFrom

        public List<LogEvent> getLogsFrom​(LogLevel level)
        Filter logs of a specific level.
        Parameters:
        level - the level of the logs to return
        Returns:
        the filtered logs
        Since:
        4.2M1
      • containLogsFrom

        public boolean containLogsFrom​(LogLevel level)
        Indicate if the list contains logs of a specific level.
        Parameters:
        level - the level of the logs to return
        Returns:
        true if log of provided level or less exist
        Since:
        6.0M1
      • getName

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

        public boolean isTraceEnabled()
        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 t)
        Specified by:
        trace 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​(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... arguments)
        Specified by:
        trace in interface org.slf4j.Logger
      • trace

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

        public boolean isDebugEnabled()
        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 t)
        Specified by:
        debug 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​(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 t)
        Specified by:
        debug in interface org.slf4j.Logger
      • isInfoEnabled

        public boolean isInfoEnabled()
        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 t)
        Specified by:
        info 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​(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 t)
        Specified by:
        info in interface org.slf4j.Logger
      • isWarnEnabled

        public boolean isWarnEnabled()
        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 arg1,
                         Object arg2)
        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 msg,
                         Throwable t)
        Specified by:
        warn 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​(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 t)
        Specified by:
        warn in interface org.slf4j.Logger
      • isErrorEnabled

        public boolean isErrorEnabled()
        Specified by:
        isErrorEnabled in interface org.slf4j.Logger
      • 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 t)
        Specified by:
        error in interface org.slf4j.Logger
      • isErrorEnabled

        public boolean isErrorEnabled​(org.slf4j.Marker marker)
        Specified by:
        isErrorEnabled 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 t)
        Specified by:
        error in interface org.slf4j.Logger
      • flush

        public void flush()
        Description copied from interface: LoggerTail
        Force writing and wait for any writing to be finished.
        Specified by:
        flush in interface LoggerTail