logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1431908 - in /logging/log4j/log4j2/trunk: core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java src/changes/changes.xml
Date Fri, 11 Jan 2013 06:20:03 GMT
Author: ggregory
Date: Fri Jan 11 06:20:03 2013
New Revision: 1431908

URL: http://svn.apache.org/viewvc?rev=1431908&view=rev
Log:
[LOG4J2-144] NullPointerException in RFC5424Layout.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
    logging/log4j/log4j2/trunk/src/changes/changes.xml

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java?rev=1431908&r1=1431907&r2=1431908&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
Fri Jan 11 06:20:03 2013
@@ -475,14 +475,15 @@ public final class RFC5424Layout extends
         if (charsetName != null) {
             if (Charset.isSupported(charsetName)) {
                 charset = Charset.forName(charsetName);
-            } else {
-                LOGGER.error("Charset " + charsetName + " is not supported for layout, using
" + charset.displayName());
-            }
+            } 
         }
         if (charset == null) {
             charset = Charset.isSupported("UTF-8") ? Charset.forName("UTF-8") : Charset.defaultCharset();
+            if (charsetName != null) {
+                LOGGER.error("Charset " + charsetName + " is not supported for layout, using
" + charset.displayName());
+            }
         }
-
+        
         if (includes != null && excludes != null) {
             LOGGER.error("mdcIncludes and mdcExcludes are mutually exclusive. Includes wil
be ignored");
             includes = null;

Modified: logging/log4j/log4j2/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/changes/changes.xml?rev=1431908&r1=1431907&r2=1431908&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/changes/changes.xml (original)
+++ logging/log4j/log4j2/trunk/src/changes/changes.xml Fri Jan 11 06:20:03 2013
@@ -23,6 +23,9 @@
 
   <body>
     <release version="2.0-beta4" date="TBD" description="Bug fixes and enhancements">
+      <action issue="LOG4J2-144" dev="ggregory" type="fix">
+        NullPointerException in RFC5424Layout.
+      </action>
       <action issue="LOG4J2-143" dev="rgoers" type="fix">
         MessagePatternConverter now returns "null" if the log message is null.
       </action>



Mime
View raw message