org.apache.log4j.lf5
public class: DefaultLF5Configurator [javadoc |
source]
java.lang.Object
org.apache.log4j.lf5.DefaultLF5Configurator
All Implemented Interfaces:
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.
| Method from org.apache.log4j.lf5.DefaultLF5Configurator Detail: |
public static void configure() throws 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);
}
}
This method configures the LF5Appender using a
default configuration file. The default configuration file is
defaultconfig.properties. |
public void doConfigure(URL configURL,
LoggerRepository repository) {
throw new IllegalStateException("This class should NOT be" +
" instantiated!");
}
This is a dummy method that will throw an
IllegalStateException if used. |