You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by an...@apache.org on 2012/01/27 10:11:54 UTC
svn commit: r1236611 -
/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/util/Log4jLogStreamFactory.java
Author: andygumbrecht
Date: Fri Jan 27 09:11:53 2012
New Revision: 1236611
URL: http://svn.apache.org/viewvc?rev=1236611&view=rev
Log:
Embedded context should also honor conf/logging.properties if found.
Modified:
openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/util/Log4jLogStreamFactory.java
Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/util/Log4jLogStreamFactory.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/util/Log4jLogStreamFactory.java?rev=1236611&r1=1236610&r2=1236611&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/util/Log4jLogStreamFactory.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/util/Log4jLogStreamFactory.java Fri Jan 27 09:11:53 2012
@@ -70,7 +70,7 @@ public class Log4jLogStreamFactory imple
//Use the old file name first
File loggingPropertiesFile = new File(confDir, LOGGING_PROPERTIES_FILE);
- if (!embedded && confDir.exists()) {
+ if ((!embedded && confDir.exists()) || (embedded && loggingPropertiesFile.exists())) {
if (!loggingPropertiesFile.exists()) {
//Use the new file name
@@ -95,8 +95,7 @@ public class Log4jLogStreamFactory imple
installLoggingPropertiesFile(loggingPropertiesFile);
}
} else {
- // no conf directory, so we assume we are embedded
- // configure log4j directly
+ // Embedded and no logging.properties so configure log4j directly
configureEmbedded();
}
}
@@ -186,7 +185,6 @@ public class Log4jLogStreamFactory imple
InputStream in = null;
try {
in = resource.openStream();
- in = new BufferedInputStream(in);
properties.load(in);
} catch (Throwable e) {
//Ignore