logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject logging-log4j2 git commit: LOG4J2-2316 - If root LoggerConfig does not have a Level return ERROR
Date Sun, 22 Jul 2018 08:06:36 GMT
Repository: logging-log4j2
Updated Branches:
  refs/heads/release-2.x 61732f34b -> ab548ce56


LOG4J2-2316 - If root LoggerConfig does not have a Level return ERROR


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/ab548ce5
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/ab548ce5
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/ab548ce5

Branch: refs/heads/release-2.x
Commit: ab548ce56dfab2c8db9ecc97365e8f734949509a
Parents: 61732f3
Author: Ralph Goers <rgoers@apache.org>
Authored: Sun Jul 22 01:05:55 2018 -0700
Committer: Ralph Goers <rgoers@apache.org>
Committed: Sun Jul 22 01:05:55 2018 -0700

----------------------------------------------------------------------
 .../java/org/apache/logging/log4j/core/config/LoggerConfig.java   | 2 +-
 src/changes/changes.xml                                           | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/ab548ce5/log4j-core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java
b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java
index 092c3a2..8db7c32 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java
@@ -268,7 +268,7 @@ public class LoggerConfig extends AbstractFilterable {
      * @return the logging Level.
      */
     public Level getLevel() {
-        return level == null ? parent.getLevel() : level;
+        return level == null ? parent == null ? Level.ERROR : parent.getLevel() : level;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/ab548ce5/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 776b7d4..5505bb7 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -31,6 +31,9 @@
          - "remove" - Removed
     -->
     <release version="2.11.1" date="2018-MM-DD" description="GA Release 2.11.1">
+      <action issue="LOG4J2-2316" dev="rgoers" type="fix">
+        If root LoggerConfig does not have a Level return ERROR.
+      </action>
       <action issue="LOG4J2-2390" dev="rgoers" type="fix" due-to="anton-balaniuc">
         Fix broken links in log4j web documentation.
       </action>


Mime
View raw message