logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1432554 - in /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core: appender/SyslogAppender.java layout/HTMLLayout.java layout/PatternLayout.java layout/SyslogLayout.java layout/XMLLayout.java
Date Sun, 13 Jan 2013 04:54:36 GMT
Author: ggregory
Date: Sun Jan 13 04:54:36 2013
New Revision: 1432554

URL: http://svn.apache.org/viewvc?rev=1432554&view=rev
Log:
Rename local var name 'c' to 'charset'.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/HTMLLayout.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/SyslogLayout.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.java

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java?rev=1432554&r1=1432553&r2=1432554&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java
Sun Jan 13 04:54:36 2013
@@ -106,12 +106,12 @@ public class SyslogAppender extends Sock
         final boolean handleExceptions = suppress == null ? true : Boolean.valueOf(suppress);
         final int reconnectDelay = delay == null ? 0 : Integer.parseInt(delay);
         final int port = portNum == null ? 0 : Integer.parseInt(portNum);
-        Charset c = Charset.isSupported("UTF-8") ? Charset.forName("UTF-8") : Charset.defaultCharset();
+        Charset charset = Charset.isSupported("UTF-8") ? Charset.forName("UTF-8") : Charset.defaultCharset();
         if (charsetName != null) {
             if (Charset.isSupported(charsetName)) {
-                c = Charset.forName(charsetName);
+                charset = Charset.forName(charsetName);
             } else {
-                LOGGER.error("Charset " + charsetName + " is not supported for layout, using
" + c.displayName());
+                LOGGER.error("Charset " + charsetName + " is not supported for layout, using
" + charset.displayName());
             }
         }
         final Layout layout = (RFC5424.equalsIgnoreCase(format)) ?

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/HTMLLayout.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/HTMLLayout.java?rev=1432554&r1=1432553&r2=1432554&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/HTMLLayout.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/HTMLLayout.java
Sun Jan 13 04:54:36 2013
@@ -300,12 +300,12 @@ public final class HTMLLayout extends Ab
                                           @PluginAttr("charset") final String charsetName,
                                           @PluginAttr("fontSize") String fontSize,
                                           @PluginAttr("fontName") String font) {
-        Charset c = Charset.isSupported("UTF-8") ? Charset.forName("UTF-8") : Charset.defaultCharset();
+        Charset charset = Charset.isSupported("UTF-8") ? Charset.forName("UTF-8") : Charset.defaultCharset();
         if (charsetName != null) {
             if (Charset.isSupported(charsetName)) {
-                c = Charset.forName(charsetName);
+                charset = Charset.forName(charsetName);
             } else {
-                LOGGER.error("Charset " + charsetName + " is not supported for layout, using
" + c.displayName());
+                LOGGER.error("Charset " + charsetName + " is not supported for layout, using
" + charset.displayName());
             }
         }
         if (font == null) {
@@ -321,6 +321,6 @@ public final class HTMLLayout extends Ab
         if (contentType == null) {
             contentType = DEFAULT_CONTENT_TYPE;
         }
-        return new HTMLLayout(info, title, contentType, c, font, fontSize, headerSize);
+        return new HTMLLayout(info, title, contentType, charset, font, fontSize, headerSize);
     }
 }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java?rev=1432554&r1=1432553&r2=1432554&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java
Sun Jan 13 04:54:36 2013
@@ -177,14 +177,14 @@ public final class PatternLayout extends
                                              @PluginConfiguration final Configuration config,
                                              @PluginElement("replace") final RegexReplacement
replace,
                                              @PluginAttr("charset") final String charsetName)
{
-        Charset c = Charset.isSupported("UTF-8") ? Charset.forName("UTF-8") : Charset.defaultCharset();
+        Charset charset = Charset.isSupported("UTF-8") ? Charset.forName("UTF-8") : Charset.defaultCharset();
         if (charsetName != null) {
             if (Charset.isSupported(charsetName)) {
-                c = Charset.forName(charsetName);
+                charset = Charset.forName(charsetName);
             } else {
-                LOGGER.error("Charset " + charsetName + " is not supported for layout, using
" + c.displayName());
+                LOGGER.error("Charset " + charsetName + " is not supported for layout, using
" + charset.displayName());
             }
         }
-        return new PatternLayout(config, replace, pattern == null ? DEFAULT_CONVERSION_PATTERN
: pattern, c);
+        return new PatternLayout(config, replace, pattern == null ? DEFAULT_CONVERSION_PATTERN
: pattern, charset);
     }
 }

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=1432554&r1=1432553&r2=1432554&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 Jan 13 04:54:36 2013
@@ -134,16 +134,16 @@ public class SyslogLayout extends Abstra
                                             @PluginAttr("newLineEscape") final String escapeNL,
                                             @PluginAttr("charset") final String charsetName)
{
 
-        Charset c = Charset.isSupported("UTF-8") ? Charset.forName("UTF-8") : Charset.defaultCharset();
+        Charset charset = Charset.isSupported("UTF-8") ? Charset.forName("UTF-8") : Charset.defaultCharset();
         if (charsetName != null) {
             if (Charset.isSupported(charsetName)) {
-                c = Charset.forName(charsetName);
+                charset = Charset.forName(charsetName);
             } else {
-                LOGGER.error("Charset " + charsetName + " is not supported for layout, using
" + c.displayName());
+                LOGGER.error("Charset " + charsetName + " is not supported for layout, using
" + charset.displayName());
             }
         }
         final boolean includeNewLine = includeNL == null ? false : Boolean.valueOf(includeNL);
         final Facility f = Facility.toFacility(facility, Facility.LOCAL0);
-        return new SyslogLayout(f, includeNewLine, escapeNL, c);
+        return new SyslogLayout(f, includeNewLine, escapeNL, charset);
     }
 }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.java?rev=1432554&r1=1432553&r2=1432554&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.java
Sun Jan 13 04:54:36 2013
@@ -261,17 +261,17 @@ public class XMLLayout extends AbstractS
                                          @PluginAttr("properties") final String properties,
                                          @PluginAttr("complete") final String complete,
                                          @PluginAttr("charset") final String charsetName)
{
-        Charset c = Charset.isSupported("UTF-8") ? Charset.forName("UTF-8") : Charset.defaultCharset();
+        Charset charset = Charset.isSupported("UTF-8") ? Charset.forName("UTF-8") : Charset.defaultCharset();
         if (charsetName != null) {
             if (Charset.isSupported(charsetName)) {
-                c = Charset.forName(charsetName);
+                charset = Charset.forName(charsetName);
             } else {
-                LOGGER.error("Charset " + charsetName + " is not supported for layout, using
" + c.displayName());
+                LOGGER.error("Charset " + charsetName + " is not supported for layout, using
" + charset.displayName());
             }
         }
         final boolean info = locationInfo == null ? false : Boolean.valueOf(locationInfo);
         final boolean props = properties == null ? false : Boolean.valueOf(properties);
         final boolean comp = complete == null ? false : Boolean.valueOf(complete);
-        return new XMLLayout(info, props, comp, c);
+        return new XMLLayout(info, props, comp, charset);
     }
 }



Mime
View raw message