You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2018/07/22 08:06:28 UTC
logging-log4j2 git commit: LOG4J2-2316 - If root LoggerConfig does
not have a Level return ERROR
Repository: logging-log4j2
Updated Branches:
refs/heads/master 53fac8e80 -> 419944877
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/41994487
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/41994487
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/41994487
Branch: refs/heads/master
Commit: 419944877c5161b05d6eb294cdb185e9df036fb3
Parents: 53fac8e
Author: Ralph Goers <rg...@apache.org>
Authored: Sun Jul 22 01:06:19 2018 -0700
Committer: Ralph Goers <rg...@apache.org>
Committed: Sun Jul 22 01:06:19 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/41994487/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/41994487/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index b8b8049..584cafe 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -226,6 +226,9 @@
</action>
</release>
<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>