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 2020/04/17 03:02:17 UTC

[logging-log4j2] branch master updated (9834772 -> a8fdc5b)

This is an automated email from the ASF dual-hosted git repository.

rgoers pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git.


    from 9834772  Remove -Djenkins property for windows CI build
     add d787956  LOG4J2-2793 - Unable to parse the log LEVEL when it ends with SPACE.
     new 2baf716  Merge branch 'master' of https://github.com/prasad-acit/logging-log4j2 into prasad-acit-master
     new ff07d4a  LOG4J2-2793 - Allow trailing and leading spaces in log level
     new a8fdc5b  Merge branch 'prasad-acit-master'

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 log4j-api/src/main/java/org/apache/logging/log4j/Level.java   |  4 ++--
 .../src/test/java/org/apache/logging/log4j/LevelTest.java     | 11 +++++++++++
 src/changes/changes.xml                                       |  3 +++
 3 files changed, 16 insertions(+), 2 deletions(-)


[logging-log4j2] 01/03: Merge branch 'master' of https://github.com/prasad-acit/logging-log4j2 into prasad-acit-master

Posted by rg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rgoers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 2baf716d017852986939fc7c2e8ec7c091f4b152
Merge: 9834772 d787956
Author: Ralph Goers <rg...@apache.org>
AuthorDate: Thu Apr 16 18:51:43 2020 -0700

    Merge branch 'master' of https://github.com/prasad-acit/logging-log4j2 into prasad-acit-master

 log4j-api/src/main/java/org/apache/logging/log4j/Level.java   |  6 ++++--
 .../src/test/java/org/apache/logging/log4j/LevelTest.java     | 11 +++++++++++
 2 files changed, 15 insertions(+), 2 deletions(-)


[logging-log4j2] 03/03: Merge branch 'prasad-acit-master'

Posted by rg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rgoers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit a8fdc5b72d426c41c8095de0ed588a5d1ec9b96d
Merge: 9834772 ff07d4a
Author: Ralph Goers <rg...@apache.org>
AuthorDate: Thu Apr 16 20:01:53 2020 -0700

    Merge branch 'prasad-acit-master'

 log4j-api/src/main/java/org/apache/logging/log4j/Level.java   |  4 ++--
 .../src/test/java/org/apache/logging/log4j/LevelTest.java     | 11 +++++++++++
 src/changes/changes.xml                                       |  3 +++
 3 files changed, 16 insertions(+), 2 deletions(-)


[logging-log4j2] 02/03: LOG4J2-2793 - Allow trailing and leading spaces in log level

Posted by rg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rgoers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit ff07d4a8a2cee5808f2083dedd02aac7304e02da
Author: Ralph Goers <rg...@apache.org>
AuthorDate: Thu Apr 16 20:01:03 2020 -0700

    LOG4J2-2793 - Allow trailing and leading spaces in log level
---
 log4j-api/src/main/java/org/apache/logging/log4j/Level.java | 6 ++----
 src/changes/changes.xml                                     | 3 +++
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/Level.java b/log4j-api/src/main/java/org/apache/logging/log4j/Level.java
index f6c7401..58507d0 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/Level.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/Level.java
@@ -284,8 +284,7 @@ public final class Level implements Comparable<Level>, Serializable {
         if (name == null) {
             return defaultLevel;
         }
-        String trimmedName = name.trim();
-        final Level level = LEVELS.get(toUpperCase(trimmedName));
+        final Level level = LEVELS.get(toUpperCase(name.trim()));
         return level == null ? defaultLevel : level;
     }
 
@@ -313,8 +312,7 @@ public final class Level implements Comparable<Level>, Serializable {
      */
     public static Level valueOf(final String name) {
         Objects.requireNonNull(name, "No level name given.");
-        String trimmedName = name.trim();
-        final String levelName = toUpperCase(trimmedName);
+        final String levelName = toUpperCase(name.trim());
         final Level level = LEVELS.get(levelName);
         if (level != null) {
             return level;
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 457c5e6..d01bc1c 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -169,6 +169,9 @@
       </action>
     </release>
     <release version="2.13.2" date="2020-MM-DD" description="GA Release 2.13.2">
+      <action issue="LOG4J2-2793" dev="rgoers" type="fix" due-to="Renukaprasad C">
+        Allow trailing and leading spaces in log level.
+      </action>
       <action issue="LOG4J2-2520" dev="rgoers" type="update">
         Allow servlet context path to be retrieved without "/".
       </action>