Class StatefulNullMessageLogger

Object
StatefulNullMessageLogger
All Implemented Interfaces:
MessageLogger, StatefulMessageLogger

public class StatefulNullMessageLogger extends Object implements StatefulMessageLogger
Does nothing (i.e. simply ignores) with any messages logged.

This is kept distinct from NullMessageLogger as it also implements the StatefulMessageLogger interface which exists in a more downstream package as MessageLogger.

Author:
Owen Feehan
  • Constructor Details

    • StatefulNullMessageLogger

      public StatefulNullMessageLogger()
  • Method Details

    • start

      public void start()
      Description copied from interface: StatefulMessageLogger
      Starts logging.

      This must be called once before any logging occurs.

      Specified by:
      start in interface StatefulMessageLogger
    • log

      public void log(String message)
      Specified by:
      log in interface MessageLogger
    • logFormatted

      public void logFormatted(String formatString, Object... args)
      Specified by:
      logFormatted in interface MessageLogger
    • close

      public void close(boolean successful, boolean warningOccurred)
      Description copied from interface: StatefulMessageLogger
      Stops logging.

      This must be called once after all logging has occurred.

      Specified by:
      close in interface StatefulMessageLogger
      Parameters:
      successful - true when the task completed successfully.
      warningOccurred - true if at least one warning has occurred, false otherwise.