Class LogHandler

All Implemented Interfaces:
OpenCloseable, Closeable, AutoCloseable
Direct Known Subclasses:
BlockingLogHandler, CountingLogHandler, ErrorDescLogHandler, FilteringLogHandler, ParseLogHandler, RedirectingLogHandler, RetainingLogHandler, TimingLogHandler

public abstract class LogHandler extends Object implements Closeable, OpenCloseable
A log handler is used to handle Skripts logging. A log handler is local to the thread it is started on.
Log handlers should always be stopped when they are no longer needed.
See Also:
  • Constructor Details

    • LogHandler

      public LogHandler()
  • Method Details

    • log

      public abstract LogHandler.LogResult log(LogEntry entry)
      entry - entry to log
      Whether to print the specified entry or not.
    • onStop

      protected void onStop()
      Called just after the handler is removed from the active handlers stack.
    • stop

      public final void stop()
    • isStopped

      public boolean isStopped()
    • start

      public LogHandler start()
      A convenience method for SkriptLogger.startLogHandler(LogHandler).
      Implementations should override this to set the return type to the implementing class.
    • open

      public void open()
      Specified by:
      open in interface OpenCloseable
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface OpenCloseable