Class QueuedConsoleLogAppender

java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.UnsynchronizedAppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>
ch.qos.logback.core.OutputStreamAppender<ch.qos.logback.classic.spi.ILoggingEvent>
ch.qos.logback.core.ConsoleAppender<ch.qos.logback.classic.spi.ILoggingEvent>
eu.cloudnetservice.node.impl.log.QueuedConsoleLogAppender
All Implemented Interfaces:
ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.ILoggingEvent>, ch.qos.logback.core.spi.ContextAware, ch.qos.logback.core.spi.FilterAttachable<ch.qos.logback.classic.spi.ILoggingEvent>, ch.qos.logback.core.spi.LifeCycle

public final class QueuedConsoleLogAppender extends ch.qos.logback.core.ConsoleAppender<ch.qos.logback.classic.spi.ILoggingEvent>
A logging handler for developers, that can easy handle and get the logging outputs from this node instance
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Queue<ch.qos.logback.classic.spi.ILoggingEvent>
    A queue that contain the last 128 logging output as LogEntries that should print into the console
    private final eu.cloudnetservice.driver.event.EventManager
     

    Fields inherited from class ch.qos.logback.core.ConsoleAppender

    target, withJansi

    Fields inherited from class ch.qos.logback.core.OutputStreamAppender

    encoder, streamWriteLock

    Fields inherited from class ch.qos.logback.core.UnsynchronizedAppenderBase

    name, started

    Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase

    context
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    append(@NonNull ch.qos.logback.classic.spi.ILoggingEvent event)
     
    @NonNull Queue<ch.qos.logback.classic.spi.ILoggingEvent>
     
     

    Methods inherited from class ch.qos.logback.core.ConsoleAppender

    getTarget, isWithJansi, setTarget, setWithJansi, start

    Methods inherited from class ch.qos.logback.core.OutputStreamAppender

    closeOutputStream, getEncoder, getOutputStream, isImmediateFlush, setEncoder, setImmediateFlush, setLayout, setOutputStream, stop, subAppend, updateByteCount, writeByteArrayToOutputStreamWithPossibleFlush, writeOut

    Methods inherited from class ch.qos.logback.core.UnsynchronizedAppenderBase

    addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toString

    Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase

    addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface ch.qos.logback.core.spi.ContextAware

    addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
  • Field Details

    • eventManager

      private final eu.cloudnetservice.driver.event.EventManager eventManager
    • cachedQueuedLogEntries

      private final Queue<ch.qos.logback.classic.spi.ILoggingEvent> cachedQueuedLogEntries
      A queue that contain the last 128 logging output as LogEntries that should print into the console
  • Constructor Details

    • QueuedConsoleLogAppender

      public QueuedConsoleLogAppender()
  • Method Details

    • cachedLogEntries

      @NonNull public @NonNull Queue<ch.qos.logback.classic.spi.ILoggingEvent> cachedLogEntries()
    • formattedCachedLogLines

      @NonNull public @NonNull Queue<String> formattedCachedLogLines()
    • append

      protected void append(@NonNull @NonNull ch.qos.logback.classic.spi.ILoggingEvent event)
      Overrides:
      append in class ch.qos.logback.core.OutputStreamAppender<ch.qos.logback.classic.spi.ILoggingEvent>