https://issues.apache.org/bugzilla/show_bug.cgi?id=51279
Bug #: 51279
Summary: log4j.properties doesn't support environment variable
Product: Log4j
Version: 1.2
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: major
Priority: P2
Component: Configurator
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
Suggested solution:
in src\java\org\apache\log4j\helpers\OptionConverter.java
relace
// first try in System properties
String replacement = getSystemProperty(key, null);
with
// then try in environment properties
if (replacement == null) {
replacement = getEnvProperty(key, null);
}
And add function
public String getEnvProperty(String key, String def) {
try {
String value = System.getenv(key);
if (value == null) {
value = def;
}
return value;
} catch(Throwable e) {
return def;
}
}
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]