org.apache.log4j.spi

## Interface LoggerEventListener

-     public interface LoggerEventListener

  Interface used to listen for Logger related events such as add/remove appender or changing levels. Clients register an instance of the interface and the instance is called back when the various events occur. LoggerRepository provides methods for adding and removing LoggerEventListener instances. When implementing the methods of this interface, it is useful to remember that the Logger can access the repository using its getRepository() method.
  Author:
    Ceki Gülcü, Mark Womack

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `appenderAddedEvent(org.apache.log4j.Logger logger, org.apache.log4j.Appender appender)` Called when an appender is added to the logger.
    `void` | `appenderRemovedEvent(org.apache.log4j.Logger logger, org.apache.log4j.Appender appender)` Called when an appender is removed from the logger.
    `void` | `levelChangedEvent(org.apache.log4j.Logger logger)` Called when level changed on the logger.

- - ### Method Detail

    - #### appenderAddedEvent

          void appenderAddedEvent(org.apache.log4j.Logger logger,
                                  org.apache.log4j.Appender appender)

      Called when an appender is added to the logger.
      Parameters:
        `logger` - The logger to which the appender was added.
        `appender` - The appender added to the logger.

    - #### appenderRemovedEvent

          void appenderRemovedEvent(org.apache.log4j.Logger logger,
                                    org.apache.log4j.Appender appender)

      Called when an appender is removed from the logger.
      Parameters:
        `logger` - The logger from which the appender was removed.
        `appender` - The appender removed from the logger.

    - #### levelChangedEvent

          void levelChangedEvent(org.apache.log4j.Logger logger)

      Called when level changed on the logger.
      Parameters:
        `logger` - The logger that changed levels.

Copyright © 2002-2018 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache Chainsaw, Chainsaw, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.