Interface ChangingStatusLogger.ChangingStatus

All Known Implementing Classes:
ChangingStatusLogger.ChangingStatusDefault
Enclosing class:
ChangingStatusLogger

public static interface ChangingStatusLogger.ChangingStatus
Implementations MUST override the equals method.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get a copy of the parameters array.
    Get the parameters to pass to the logger when logging a message.
    Get the message template.
    void
    logIfChanged(org.slf4j.Logger logger)
    Check if the status changed, and if so, log the configured message to the given logger.
    default void
    Called before each log action.
  • Method Details

    • getLogMessageTemplate

      String getLogMessageTemplate()
      Get the message template.
      Returns:
      the message template, with placeholders for the parameters, to pass to the logger.
    • getCurrentParams

      Object[] getCurrentParams()
      Get the parameters to pass to the logger when logging a message.
      Returns:
      The parameters to pass to the logger.
    • getCopyCurrentParams

      Object[] getCopyCurrentParams()
      Get a copy of the parameters array.
      Returns:
      a copy of the parameters array.
    • logIfChanged

      void logIfChanged(org.slf4j.Logger logger)
      Check if the status changed, and if so, log the configured message to the given logger. The method will be periodically called.
      Parameters:
      logger - The logger to log to.
    • process

      default void process()
      Called before each log action. Can be used by an implementation to gather statistics.