logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1501480 - in /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender: AsyncAppender.java SMTPAppender.java SocketAppender.java SyslogAppender.java
Date Tue, 09 Jul 2013 19:27:10 GMT
Author: ggregory
Date: Tue Jul  9 19:27:09 2013
New Revision: 1501480

URL: http://svn.apache.org/r1501480
Log:
Use AbstractAppender.parseInt to log parsing exceptions to AbstractAppender's logger.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SMTPAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SocketAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java?rev=1501480&r1=1501479&r2=1501480&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java
Tue Jul  9 19:27:09 2013
@@ -184,7 +184,7 @@ public final class AsyncAppender<T exten
         }
 
         final boolean isBlocking = Booleans.parseBoolean(blocking, true);
-        final int queueSize = Integers.parseInt(size, DEFAULT_QUEUE_SIZE);        
+        final int queueSize = AbstractAppender.parseInt(size, DEFAULT_QUEUE_SIZE);      
 
         final boolean isIncludeLocation = Boolean.parseBoolean(includeLocation);
         final boolean handleExceptions = Booleans.parseBoolean(suppress, true);
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SMTPAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SMTPAppender.java?rev=1501480&r1=1501479&r2=1501480&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SMTPAppender.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SMTPAppender.java
Tue Jul  9 19:27:09 2013
@@ -131,7 +131,7 @@ public final class SMTPAppender<T extend
         }
 
         final boolean isHandleExceptions = Booleans.parseBoolean(suppressExceptions, true);
-        final int smtpPort = Integers.parseInt(smtpPortNum); 
+        final int smtpPort = AbstractAppender.parseInt(smtpPortNum, 0); 
         final boolean isSmtpDebug = Boolean.parseBoolean(smtpDebug);
         final int bufferSize = bufferSizeNum == null ? DEFAULT_BUFFER_SIZE : Integer.valueOf(bufferSizeNum);
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SocketAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SocketAppender.java?rev=1501480&r1=1501479&r2=1501480&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SocketAppender.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/SocketAppender.java
Tue Jul  9 19:27:09 2013
@@ -106,7 +106,7 @@ public class SocketAppender<T extends Se
         final boolean isAdvertise = Boolean.parseBoolean(advertise);
         final boolean handleExceptions = Booleans.parseBoolean(suppress, true);
         final boolean fail = Booleans.parseBoolean(immediateFail, true);
-        final int reconnectDelay = Integers.parseInt(delay);
+        final int reconnectDelay = AbstractAppender.parseInt(delay, 0);
         final int port = Integers.parseInt(portNum);
         if (layout == null) {
             @SuppressWarnings({ "unchecked", "UnnecessaryLocalVariable" })

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=1501480&r1=1501479&r2=1501480&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
Tue Jul  9 19:27:09 2013
@@ -125,9 +125,9 @@ public class SyslogAppender<T extends Se
 
         final boolean isFlush = Booleans.parseBoolean(immediateFlush, true);
         final boolean handleExceptions = Booleans.parseBoolean(suppress, true);
-        final int reconnectDelay = Integers.parseInt(delay);
+        final int reconnectDelay = AbstractAppender.parseInt(delay, 0);
         final boolean fail = Booleans.parseBoolean(immediateFail, true);
-        final int port = Integers.parseInt(portNum);
+        final int port = AbstractAppender.parseInt(portNum, 0);
         final boolean isAdvertise = Boolean.parseBoolean(advertise);
         @SuppressWarnings("unchecked")
         final Layout<S> layout = (Layout<S>) (RFC5424.equalsIgnoreCase(format)
?



Mime
View raw message