logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1405568 - in /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout: RFC5424Layout.java SyslogLayout.java
Date Sun, 04 Nov 2012 15:43:59 GMT
Author: ggregory
Date: Sun Nov  4 15:43:58 2012
New Revision: 1405568

URL: http://svn.apache.org/viewvc?rev=1405568&view=rev
Log:
Avoid problems on the Turkish Locale.

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

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=1405568&r1=1405567&r2=1405568&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
Sun Nov  4 15:43:58 2012
@@ -39,6 +39,7 @@ import java.util.Calendar;
 import java.util.Enumeration;
 import java.util.GregorianCalendar;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.SortedMap;
 import java.util.TreeMap;
@@ -468,7 +469,7 @@ public final class RFC5424Layout extends
             LOGGER.error("mdcIncludes and mdcExcludes are mutually exclusive. Includes wil
be ignored");
             includes = null;
         }
-        Facility f = facility != null ? Facility.valueOf(facility.toUpperCase()) : Facility.LOCAL0;
+        Facility f = facility != null ? Facility.valueOf(facility.toUpperCase(Locale.ENGLISH))
: Facility.LOCAL0;
         int enterpriseNumber = ein == null ? DEFAULT_ENTERPRISE_NUMBER : Integer.parseInt(ein);
         boolean isMdc = includeMDC == null ? true : Boolean.valueOf(includeMDC);
         boolean includeNewLine = includeNL == null ? false : Boolean.valueOf(includeNL);

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/SyslogLayout.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/SyslogLayout.java?rev=1405568&r1=1405567&r2=1405568&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/SyslogLayout.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/SyslogLayout.java
Sun Nov  4 15:43:58 2012
@@ -126,7 +126,7 @@ public class SyslogLayout extends Abstra
             }
         }
         boolean includeNewLine = includeNL == null ? false : Boolean.valueOf(includeNL);
-        Facility f = facility != null ? Facility.valueOf(facility.toUpperCase()) : Facility.LOCAL0;
+        Facility f = facility != null ? Facility.valueOf(facility.toUpperCase(Locale.ENGLISH))
: Facility.LOCAL0;
         return new SyslogLayout(f, includeNewLine, c);
     }
 }



Mime
View raw message