Author: jaz
Date: Tue Aug 26 13:36:42 2008
New Revision: 689210
URL:
http://svn.apache.org/viewvc?rev=689210&view=revLog:
added option to disable log4j conifguration
Modified:
ofbiz/trunk/framework/base/config/debug.properties
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/Debug.java
Modified: ofbiz/trunk/framework/base/config/debug.properties
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/config/debug.properties?rev=689210&r1=689209&r2=689210&view=diff==============================================================================
--- ofbiz/trunk/framework/base/config/debug.properties (original)
+++ ofbiz/trunk/framework/base/config/debug.properties Tue Aug 26 13:36:42 2008
@@ -24,6 +24,9 @@
# Pack Exception Report Using Avalon Exception Util
pack.exception=true
+# Disable log4j config (used when other app servers handle the config)
+disable.log4j.config=false
+
# These top level switches are used before calling Log4J, or if Log4J is not used
print.verbose=ftrue
print.timing=true
Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/Debug.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/Debug.java?rev=689210&r1=689209&r2=689210&view=diff==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/Debug.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/Debug.java Tue Aug 26 13:36:42 2008
@@ -83,7 +83,9 @@
levelStringMap.put("notify", Debug.NOTIFY);
// initialize Log4J
- org.apache.log4j.xml.DOMConfigurator.configure(UtilURL.fromResource("log4j.xml"));
+ if (!UtilProperties.propertyValueEqualsIgnoreCase("debug.properties", "disable.log4j.config", "true")) {
+ org.apache.log4j.xml.DOMConfigurator.configure(UtilURL.fromResource("log4j.xml"));
+ }
// initialize levelOnCache
for (int i = 0; i < 9; i++) {