public class Log4j1ConfigurationParser extends Object
From the Log4j 1.2 Javadocs:
All option values admit variable substitution. The syntax of variable substitution is similar to that of Unix shells. The string between an opening "${" and closing "}" is interpreted as a key. The value of the substituted variable can be defined as a system property or in the configuration file itself. The value of the key is first searched in the system properties, and if not found there, it is then searched in the configuration file being parsed. The corresponding value replaces the ${variableName} sequence. For example, if java.home system property is set to /home/xyz, then every occurrence of the sequence ${java.home} will be interpreted as /home/xyz.
Constructor and Description |
---|
Log4j1ConfigurationParser() |
Modifier and Type | Method and Description |
---|---|
org.apache.logging.log4j.core.config.builder.api.ConfigurationBuilder<org.apache.logging.log4j.core.config.builder.impl.BuiltConfiguration> |
buildConfigurationBuilder(InputStream input)
Parses a Log4j 1.2 properties configuration file in ISO 8859-1 encoding into a ConfigurationBuilder.
|
public Log4j1ConfigurationParser()
public org.apache.logging.log4j.core.config.builder.api.ConfigurationBuilder<org.apache.logging.log4j.core.config.builder.impl.BuiltConfiguration> buildConfigurationBuilder(InputStream input) throws IOException
input
- InputStream to read from is assumed to be ISO 8859-1, and will not be closed.IOException
- if unable to read the inputorg.apache.logging.log4j.core.config.ConfigurationException
- if the input does not contain a valid configurationCopyright © 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.