org.apache.hadoop.service

## Class LoggingStateChangeListener

- java.lang.Object
- - org.apache.hadoop.service.LoggingStateChangeListener

- All Implemented Interfaces:
    ServiceStateChangeListener

      @InterfaceAudience.Public
       @InterfaceStability.Evolving
      public class LoggingStateChangeListener
      extends Object
      implements ServiceStateChangeListener

  This is a state change listener that logs events at INFO level

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LoggingStateChangeListener()` Log events to the static log for this class
    `LoggingStateChangeListener(org.slf4j.Logger log)` Log events to the given log

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `stateChanged(Service service)` Callback for a state change event: log it

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### LoggingStateChangeListener

          public LoggingStateChangeListener(org.slf4j.Logger log)

      Log events to the given log
      Parameters:
        `log` - destination for events

    - #### LoggingStateChangeListener

          public LoggingStateChangeListener()

      Log events to the static log for this class

  - ### Method Detail

    - #### stateChanged

          public void stateChanged(Service service)

      Callback for a state change event: log it
      Specified by:
        `stateChanged` in interface `ServiceStateChangeListener`
      Parameters:
        `service` - the service that has changed.

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.