public class PropertyConfigurator extends Object
Constructor and Description |
---|
PropertyConfigurator() |
Modifier and Type | Method and Description |
---|---|
static void |
configure(InputStream inputStream)
Reads configuration options from an InputStream.
|
static void |
configure(Properties properties)
Read configuration options from
properties . |
static void |
configure(String configFileName)
Read configuration options from configuration file.
|
static void |
configure(URL configURL)
Read configuration options from url
configURL . |
static void |
configureAndWatch(String configFilename)
Like
configureAndWatch(String, long) except that the
default delay as defined by FileWatchdog.DEFAULT_DELAY is
used. |
static void |
configureAndWatch(String configFilename,
long delay)
Read the configuration file
configFilename if it
exists. |
void |
doConfigure(InputStream inputStream,
LoggerRepository hierarchy)
Read configuration options from an InputStream.
|
void |
doConfigure(Properties properties,
LoggerRepository hierarchy)
Read configuration options from
properties . |
void |
doConfigure(String configFileName,
LoggerRepository hierarchy)
Read configuration options from configuration file.
|
void |
doConfigure(URL configURL,
LoggerRepository hierarchy)
Read configuration options from url
configURL . |
public PropertyConfigurator()
public void doConfigure(String configFileName, LoggerRepository hierarchy)
configFileName
- The configuration filehierarchy
- The hierarchypublic void doConfigure(Properties properties, LoggerRepository hierarchy)
properties
.
See doConfigure(String, LoggerRepository)
for the expected format.properties
- The propertieshierarchy
- The hierarchypublic void doConfigure(InputStream inputStream, LoggerRepository hierarchy)
inputStream
- The input streamhierarchy
- The hierarchypublic void doConfigure(URL configURL, LoggerRepository hierarchy)
configURL
.configURL
- The configuration URLhierarchy
- The hierarchypublic static void configure(String configFileName)
configFileName
- The configuration file.public static void configure(URL configURL)
configURL
.configURL
- The configuration URLpublic static void configure(InputStream inputStream)
inputStream
- The input streampublic static void configure(Properties properties)
properties
.
See doConfigure(String, LoggerRepository)
for the expected format.properties
- The propertiespublic static void configureAndWatch(String configFilename)
configureAndWatch(String, long)
except that the
default delay as defined by FileWatchdog.DEFAULT_DELAY is
used.configFilename
- A file in key=value format.public static void configureAndWatch(String configFilename, long delay)
configFilename
if it
exists. Moreover, a thread will be created that will periodically
check if configFilename
has been created or
modified. The period is determined by the delay
argument. If a change or file creation is detected, then
configFilename
is read to configure log4j.configFilename
- A file in key=value format.delay
- The delay in milliseconds to wait between each check.Copyright © 1999-1969 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.