Class QueuedConsoleLogHandler

  • All Implemented Interfaces:
    ILogHandler, java.lang.AutoCloseable

    public final class QueuedConsoleLogHandler
    extends java.lang.Object
    implements ILogHandler
    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 java.util.Queue<LogEntry> cachedQueuedLogEntries
      A queue that contain the last 128 logging output as LogEntries that should print into the console
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      java.util.Queue<LogEntry> getCachedQueuedLogEntries()  
      void handle​(LogEntry logEntry)
      Allows to handle this incoming LogEntry from the logger This method can invoked asynchronously or synchronously.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • cachedQueuedLogEntries

        private final java.util.Queue<LogEntry> cachedQueuedLogEntries
        A queue that contain the last 128 logging output as LogEntries that should print into the console
    • Constructor Detail

      • QueuedConsoleLogHandler

        public QueuedConsoleLogHandler()
    • Method Detail

      • handle

        public void handle​(LogEntry logEntry)
        Description copied from interface: ILogHandler
        Allows to handle this incoming LogEntry from the logger This method can invoked asynchronously or synchronously. It depends on the implementation of the logger and the setting of the LogLevel
        Specified by:
        handle in interface ILogHandler
        Parameters:
        logEntry - the new incoming log entry
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
      • getCachedQueuedLogEntries

        public java.util.Queue<LogEntry> getCachedQueuedLogEntries()