FileDocCategorySizeDatePackage
DefaultLF5Configurator.javaAPI DocApache log4j 1.2.154233Sat Aug 25 00:09:38 BST 2007org.apache.log4j.lf5

DefaultLF5Configurator

public class DefaultLF5Configurator extends Object implements Configurator
The DefaultLF5Configurator provides a default configuration for the LF5Appender. Note: The preferred method for configuring a LF5Appender is to use the LF5Manager class. This class ensures that configuration does not occur multiple times, and improves system performance. Reconfiguring the monitor multiple times can result in unexpected behavior.
author
Brent Sprecher

Fields Summary
Constructors Summary
private DefaultLF5Configurator()
This class should never be instantiated! It implements the Configurator interface, but does not provide the same functionality as full configurator class.


  
Methods Summary
public static voidconfigure()
This method configures the LF5Appender using a default configuration file. The default configuration file is defaultconfig.properties.

throws
java.io.IOException

    String resource =
        "/org/apache/log4j/lf5/config/defaultconfig.properties";
    URL configFileResource =
        DefaultLF5Configurator.class.getResource(resource);

    if (configFileResource != null) {
      PropertyConfigurator.configure(configFileResource);
    } else {
      throw new IOException("Error: Unable to open the resource" +
          resource);
    }

  
public voiddoConfigure(java.net.URL configURL, org.apache.log4j.spi.LoggerRepository repository)
This is a dummy method that will throw an IllegalStateException if used.

    throw new IllegalStateException("This class should NOT be" +
        " instantiated!");