tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject [01/50] tomee git commit: dont warn log4j is not there cause log4j.configurationFile was found, this logs a warn with log4j2 which is quite inconvenient for prod monitoring [Forced Update!]
Date Sat, 03 Dec 2016 16:37:27 GMT
Repository: tomee
Updated Branches:
  refs/heads/tomee-1.7.x c34885ec7 -> 1f4b821b9 (forced update)


dont warn log4j is not there cause log4j.configurationFile was found, this logs a warn with
log4j2 which is quite inconvenient for prod monitoring


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/43342dbc
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/43342dbc
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/43342dbc

Branch: refs/heads/tomee-1.7.x
Commit: 43342dbc6a3df54c5b2502471da8ebcbdbd8bd0a
Parents: 0189b84
Author: rmannibucau <rmannibucau@apache.org>
Authored: Thu Sep 29 19:49:16 2016 +0200
Committer: rmannibucau <rmannibucau@apache.org>
Committed: Thu Sep 29 19:49:16 2016 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/openejb/util/Logger.java           | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/43342dbc/container/openejb-core/src/main/java/org/apache/openejb/util/Logger.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/util/Logger.java b/container/openejb-core/src/main/java/org/apache/openejb/util/Logger.java
index 40f422b..edb563b 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/util/Logger.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/util/Logger.java
@@ -142,6 +142,11 @@ public class Logger {
             if (configFile.size() == 0 && systemProperties.size() == 0) {
                 return;
             }
+            if (systemProperties.size() == 1 && "log4j.configurationFile".equals(systemProperties.stringPropertyNames().iterator().next()))
{
+                // not a logger config but the overall config
+                // since log4j2 uses it too we can't pollute logs with warnings there for
that only
+                return;
+            }
 
             final LogStream stream = logStreamFactory.createLogStream(LogCategory.OPENEJB);
 


Mime
View raw message