logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1432553 - 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:52:51 GMT
Author: ggregory
Date: Sun Jan 13 04:52:51 2013
New Revision: 1432553

URL: http://svn.apache.org/viewvc?rev=1432553&view=rev
Log:
Rename param name 'charset' to 'charsetName'.

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=1432553&r1=1432552&r2=1432553&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:52:51 2013
@@ -73,7 +73,7 @@ public class SyslogAppender extends Sock
      * it will be formatted as a BSD Syslog record.
      * @param filter A Filter to determine if the event should be handled by this Appender.
      * @param config The Configuration.
-     * @param charset The character set to use when converting the syslog String to a byte
array.
+     * @param charsetName The character set to use when converting the syslog String to a
byte array.
      * @return A SyslogAppender.
      */
     @PluginFactory
@@ -99,7 +99,7 @@ public class SyslogAppender extends Sock
                                                 @PluginAttr("format") final String format,
                                                 @PluginElement("filters") final Filter filter,
                                                 @PluginConfiguration final Configuration
config,
-                                                @PluginAttr("charset") final String charset,
+                                                @PluginAttr("charset") final String charsetName,
                                                 @PluginAttr("exceptionPattern") final String
exceptionPattern) {
 
         final boolean isFlush = immediateFlush == null ? true : Boolean.valueOf(immediateFlush);
@@ -107,17 +107,17 @@ public class SyslogAppender extends Sock
         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();
-        if (charset != null) {
-            if (Charset.isSupported(charset)) {
-                c = Charset.forName(charset);
+        if (charsetName != null) {
+            if (Charset.isSupported(charsetName)) {
+                c = Charset.forName(charsetName);
             } else {
-                LOGGER.error("Charset " + charset + " is not supported for layout, using
" + c.displayName());
+                LOGGER.error("Charset " + charsetName + " is not supported for layout, using
" + c.displayName());
             }
         }
         final Layout layout = (RFC5424.equalsIgnoreCase(format)) ?
             RFC5424Layout.createLayout(facility, id, ein, includeMDC, mdcId, includeNL, escapeNL,
appName,
-                msgId, excludes, includes, required, charset, exceptionPattern, config) :
-            SyslogLayout.createLayout(facility, includeNL, escapeNL, charset);
+                msgId, excludes, includes, required, charsetName, exceptionPattern, config)
:
+            SyslogLayout.createLayout(facility, includeNL, escapeNL, charsetName);
 
         if (name == null) {
             LOGGER.error("No name provided for SyslogAppender");

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=1432553&r1=1432552&r2=1432553&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:52:51 2013
@@ -290,22 +290,22 @@ public final class HTMLLayout extends Ab
      * @param locationInfo If "true", location information will be included. The default
is false.
      * @param title The title to include in the file header. If none is specified the default
title will be used.
      * @param contentType The content type. Defaults to "text/html".
-     * @param charset The character set to use. If not specified, the default will be used.
+     * @param charsetName The character set to use. If not specified, the default will be
used.
      * @return An HTML Layout.
      */
     @PluginFactory
     public static HTMLLayout createLayout(@PluginAttr("locationInfo") final String locationInfo,
                                           @PluginAttr("title") String title,
                                           @PluginAttr("contentType") String contentType,
-                                          @PluginAttr("charset") final String charset,
+                                          @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();
-        if (charset != null) {
-            if (Charset.isSupported(charset)) {
-                c = Charset.forName(charset);
+        if (charsetName != null) {
+            if (Charset.isSupported(charsetName)) {
+                c = Charset.forName(charsetName);
             } else {
-                LOGGER.error("Charset " + charset + " is not supported for layout, using
" + c.displayName());
+                LOGGER.error("Charset " + charsetName + " is not supported for layout, using
" + c.displayName());
             }
         }
         if (font == null) {

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=1432553&r1=1432552&r2=1432553&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:52:51 2013
@@ -169,20 +169,20 @@ public final class PatternLayout extends
      * @param pattern The pattern. If not specified, defaults to DEFAULT_CONVERSION_PATTERN.
      * @param config The Configuration. Some Converters require access to the Interpolator.
      * @param replace A Regex replacement String.
-     * @param charset The character set.
+     * @param charsetName The character set.
      * @return The PatternLayout.
      */
     @PluginFactory
     public static PatternLayout createLayout(@PluginAttr("pattern") final String pattern,
                                              @PluginConfiguration final Configuration config,
                                              @PluginElement("replace") final RegexReplacement
replace,
-                                             @PluginAttr("charset") final String charset)
{
+                                             @PluginAttr("charset") final String charsetName)
{
         Charset c = Charset.isSupported("UTF-8") ? Charset.forName("UTF-8") : Charset.defaultCharset();
-        if (charset != null) {
-            if (Charset.isSupported(charset)) {
-                c = Charset.forName(charset);
+        if (charsetName != null) {
+            if (Charset.isSupported(charsetName)) {
+                c = Charset.forName(charsetName);
             } else {
-                LOGGER.error("Charset " + charset + " is not supported for layout, using
" + c.displayName());
+                LOGGER.error("Charset " + charsetName + " is not supported for layout, using
" + c.displayName());
             }
         }
         return new PatternLayout(config, replace, pattern == null ? DEFAULT_CONVERSION_PATTERN
: pattern, c);

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=1432553&r1=1432552&r2=1432553&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:52:51 2013
@@ -125,21 +125,21 @@ public class SyslogLayout extends Abstra
      * Create a SyslogLayout.
      * @param facility The Facility is used to try to classify the message.
      * @param includeNL If true a newline will be appended to the result.
-     * @param charset The character set.
+     * @param charsetName The character set.
      * @return A SyslogLayout.
      */
     @PluginFactory
     public static SyslogLayout createLayout(@PluginAttr("facility") final String facility,
                                             @PluginAttr("newLine") final String includeNL,
                                             @PluginAttr("newLineEscape") final String escapeNL,
-                                            @PluginAttr("charset") final String charset)
{
+                                            @PluginAttr("charset") final String charsetName)
{
 
         Charset c = Charset.isSupported("UTF-8") ? Charset.forName("UTF-8") : Charset.defaultCharset();
-        if (charset != null) {
-            if (Charset.isSupported(charset)) {
-                c = Charset.forName(charset);
+        if (charsetName != null) {
+            if (Charset.isSupported(charsetName)) {
+                c = Charset.forName(charsetName);
             } else {
-                LOGGER.error("Charset " + charset + " is not supported for layout, using
" + c.displayName());
+                LOGGER.error("Charset " + charsetName + " is not supported for layout, using
" + c.displayName());
             }
         }
         final boolean includeNewLine = includeNL == null ? false : Boolean.valueOf(includeNL);

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=1432553&r1=1432552&r2=1432553&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:52:51 2013
@@ -253,20 +253,20 @@ public class XMLLayout extends AbstractS
      * @param locationInfo If "true" include the location information in the generated XML.
      * @param properties If "true" include the thread context in the generated XML.
      * @param complete If "true" include the XML header.
-     * @param charset The character set to use.
+     * @param charsetName The character set to use.
      * @return An XML Layout.
      */
     @PluginFactory
     public static XMLLayout createLayout(@PluginAttr("locationInfo") final String locationInfo,
                                          @PluginAttr("properties") final String properties,
                                          @PluginAttr("complete") final String complete,
-                                         @PluginAttr("charset") final String charset) {
+                                         @PluginAttr("charset") final String charsetName)
{
         Charset c = Charset.isSupported("UTF-8") ? Charset.forName("UTF-8") : Charset.defaultCharset();
-        if (charset != null) {
-            if (Charset.isSupported(charset)) {
-                c = Charset.forName(charset);
+        if (charsetName != null) {
+            if (Charset.isSupported(charsetName)) {
+                c = Charset.forName(charsetName);
             } else {
-                LOGGER.error("Charset " + charset + " is not supported for layout, using
" + c.displayName());
+                LOGGER.error("Charset " + charsetName + " is not supported for layout, using
" + c.displayName());
             }
         }
         final boolean info = locationInfo == null ? false : Boolean.valueOf(locationInfo);



Mime
View raw message