Repository: logging-log4j2
Updated Branches:
  refs/heads/master 0052710d5 -> 19ca21f3c


Better error messages.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/19ca21f3
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/19ca21f3
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/19ca21f3

Branch: refs/heads/master
Commit: 19ca21f3c398e0ee84f110151bab3b51e5ab9a54
Parents: 0052710
Author: Gary Gregory <ggreg...@apache.org>
Authored: Wed Sep 21 00:30:55 2016 -0700
Committer: Gary Gregory <ggreg...@apache.org>
Committed: Wed Sep 21 00:30:55 2016 -0700

----------------------------------------------------------------------
 .../apache/logging/log4j/core/net/server/TcpSocketServer.java    | 4 ++--
 .../apache/logging/log4j/core/net/server/UdpSocketServer.java    | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/19ca21f3/log4j-core/src/main/java/org/apache/logging/log4j/core/net/server/TcpSocketServer.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/server/TcpSocketServer.java
 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/server/TcpSocketServer.java
index aacdfb8..befa47d 100644
--- 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/server/TcpSocketServer.java
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/server/TcpSocketServer.java
@@ -181,13 +181,13 @@ public class TcpSocketServer<T extends InputStream> 
extends AbstractSocketServer
      */
     public static void main(final String[] args) throws Exception {
         if (args.length < 1 || args.length > 2) {
-            System.err.println("Incorrect number of arguments");
+            System.err.println("Incorrect number of arguments: " + 
args.length);
             printUsage();
             return;
         }
         final int port = Integer.parseInt(args[0]);
         if (port <= 0 || port >= MAX_PORT) {
-            System.err.println("Invalid port number");
+            System.err.println("Invalid port number: " + port);
             printUsage();
             return;
         }

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/19ca21f3/log4j-core/src/main/java/org/apache/logging/log4j/core/net/server/UdpSocketServer.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/server/UdpSocketServer.java
 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/server/UdpSocketServer.java
index 7cf386c..ce05b14 100644
--- 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/server/UdpSocketServer.java
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/server/UdpSocketServer.java
@@ -106,13 +106,13 @@ public class UdpSocketServer<T extends InputStream> 
extends AbstractSocketServer
      */
     public static void main(final String[] args) throws Exception {
         if (args.length < 1 || args.length > 2) {
-            System.err.println("Incorrect number of arguments");
+            System.err.println("Incorrect number of arguments: " + 
args.length);
             printUsage();
             return;
         }
         final int port = Integer.parseInt(args[0]);
         if (port <= 0 || port >= MAX_PORT) {
-            System.err.println("Invalid port number");
+            System.err.println("Invalid port number:" + port);
             printUsage();
             return;
         }

Reply via email to