LoggingStateChangeListener (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.service, class: LoggingStateChangeListener

Package org.apache.hadoop.service

# Class LoggingStateChangeListener

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

All Implemented Interfaces:
  `ServiceStateChangeListener`

@Public @Evolving public class LoggingStateChangeListener extends Object implements ServiceStateChangeListener
This is a state change listener that logs events at INFO level

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  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 Details

  - ### 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 Details

  - ### 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.