org.apache.log4j.component.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

    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 © 2013 The Apache Software Foundation. Licensed under the Apache License, Version 2.0

Apache Extras for Apache log4j, Apache log4j and Apache are trademarks of the Apache Software Foundation.