[prev in list] [next in list] [prev in thread] [next in thread]
List: log4j-dev
Subject: DO NOT REPLY [Bug 51279] New: log4j.properties doesn't support
From: bugzilla () apache ! org
Date: 2011-05-28 8:04:20
Message-ID: bug-51279-31091 () https ! issues ! apache ! org/bugzilla/
[Download RAW message or body]
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: log4j-dev@logging.apache.org
ReportedBy: zhym001@gmail.com
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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic