Determining When the Logging Configuration Properties are Reread : LogManager « Log « Java Tutorial






import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.util.logging.LogManager;

public class Main {
  public static void main(String[] argv) throws Exception {

    // Register for the event
    LogManager.getLogManager().addPropertyChangeListener(new PropertyChangeListener() {
      // This method is called when configuration file is reread
      public void propertyChange(PropertyChangeEvent evt) {
        String propName = evt.getPropertyName();
        Object oldValue = evt.getOldValue();
        Object newValue = evt.getOldValue();
        // All values are null
      }
    });
  }
}








35.7.LogManager
35.7.1.Remote ConfigReader with URLConnection
35.7.2.Determining When the Logging Configuration Properties are Reread