From 812baf8bd91d12141a9de17aed54f3195cc45d93 Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Thu, 15 Nov 2018 19:39:08 +0000
Subject: [PATCH] NDT log tweaks

---
 .../mlab/tools/ndt/swingemu/JApplet.java      |  2 +-
 .../mlab/tools/ndt/swingemu/JOptionPane.java  |  4 +--
 .../mlab/tools/ndt/swingemu/JTextArea.java    |  2 +-
 .../tools/ndt/swingemu/StyledDocument.java    |  2 +-
 .../java/src/edu/internet2/ndt/Tcpbw100.java  | 28 +++++++------------
 5 files changed, 15 insertions(+), 23 deletions(-)

diff --git a/apps/routerconsole/java/src/com/vuze/plugins/mlab/tools/ndt/swingemu/JApplet.java b/apps/routerconsole/java/src/com/vuze/plugins/mlab/tools/ndt/swingemu/JApplet.java
index 1dc4af7c77..42b49bdf5b 100644
--- a/apps/routerconsole/java/src/com/vuze/plugins/mlab/tools/ndt/swingemu/JApplet.java
+++ b/apps/routerconsole/java/src/com/vuze/plugins/mlab/tools/ndt/swingemu/JApplet.java
@@ -50,7 +50,7 @@ public class JApplet extends JFrame{
 	showStatus(
 		String		str )
 	{
-		System.out.println( "status: " + str );
+		//System.out.println( "status: " + str );
 	}
 	
 	public void
diff --git a/apps/routerconsole/java/src/com/vuze/plugins/mlab/tools/ndt/swingemu/JOptionPane.java b/apps/routerconsole/java/src/com/vuze/plugins/mlab/tools/ndt/swingemu/JOptionPane.java
index 313efd1875..4c4388a102 100644
--- a/apps/routerconsole/java/src/com/vuze/plugins/mlab/tools/ndt/swingemu/JOptionPane.java
+++ b/apps/routerconsole/java/src/com/vuze/plugins/mlab/tools/ndt/swingemu/JOptionPane.java
@@ -33,7 +33,7 @@ JOptionPane
 		Object	wha,
 		String	str )
 	{
-		System.out.println( "dialog: " + str );
+		//System.out.println( "dialog: " + str );
 	}
 	
 	public static void
@@ -43,7 +43,7 @@ JOptionPane
 		String	str2,
 		int		a )
 	{
-		System.out.println( "dialog: " + str1 + "/" + str2 );
+		//System.out.println( "dialog: " + str1 + "/" + str2 );
 	}
 	
 }
diff --git a/apps/routerconsole/java/src/com/vuze/plugins/mlab/tools/ndt/swingemu/JTextArea.java b/apps/routerconsole/java/src/com/vuze/plugins/mlab/tools/ndt/swingemu/JTextArea.java
index 05b93b9846..dab6fb351d 100644
--- a/apps/routerconsole/java/src/com/vuze/plugins/mlab/tools/ndt/swingemu/JTextArea.java
+++ b/apps/routerconsole/java/src/com/vuze/plugins/mlab/tools/ndt/swingemu/JTextArea.java
@@ -50,7 +50,7 @@ JTextArea
 			
 		}else{
 			
-			System.out.println( "text: " + str );
+			//System.out.println( "text: " + str );
 		}
 		
 		text += str;
diff --git a/apps/routerconsole/java/src/com/vuze/plugins/mlab/tools/ndt/swingemu/StyledDocument.java b/apps/routerconsole/java/src/com/vuze/plugins/mlab/tools/ndt/swingemu/StyledDocument.java
index ec805e57f4..f1e69914c5 100644
--- a/apps/routerconsole/java/src/com/vuze/plugins/mlab/tools/ndt/swingemu/StyledDocument.java
+++ b/apps/routerconsole/java/src/com/vuze/plugins/mlab/tools/ndt/swingemu/StyledDocument.java
@@ -50,7 +50,7 @@ StyledDocument
 			
 		}else{
 		
-			System.out.println( "doc: " + s );
+			//System.out.println( "doc: " + s );
 		}
 		
 		str += s;
diff --git a/apps/routerconsole/java/src/edu/internet2/ndt/Tcpbw100.java b/apps/routerconsole/java/src/edu/internet2/ndt/Tcpbw100.java
index 70fecd3634..f522eb7523 100644
--- a/apps/routerconsole/java/src/edu/internet2/ndt/Tcpbw100.java
+++ b/apps/routerconsole/java/src/edu/internet2/ndt/Tcpbw100.java
@@ -1279,9 +1279,7 @@ public class Tcpbw100 extends JApplet implements ActionListener {
 	 * @param msg String value of status
 	 * */
 	public void showStatus(String msg) {
-		if (!_bIsApplication) {
-			super.showStatus(msg);
-		}
+		_log.warn(msg);
 	}
 
 	/**
@@ -1449,9 +1447,8 @@ public class Tcpbw100 extends JApplet implements ActionListener {
 					// Get Client reported server IP
 					sClientSideServerIp = midSrvrSockObj.getInetAddress() + "";
 				} catch (SecurityException e) {
-					System.err
-							.println("Unable to obtain Servers IP addresses: using "
-									+ sHostName);
+					_log.warn("Unable to obtain Servers IP addresses: using "
+									+ sHostName, e);
 					_sErrMsg = "getInetAddress() called failed\n";
 					sClientSideServerIp = sHostName;
 					_resultsTxtPane.append(_resBundDisplayMsgs
@@ -1468,8 +1465,7 @@ public class Tcpbw100 extends JApplet implements ActionListener {
 				try {
 					sClientSideClientIp = midSrvrSockObj.getLocalAddress() + ";";
 				} catch (SecurityException e) {
-					System.err
-							.println("Unable to obtain local IP address: using 127.0.0.1");
+					_log.warn("Unable to obtain local IP address: using 127.0.0.1", e);
 					_sErrMsg = "getLocalAddress() call failed\n";
 					sClientSideClientIp = NDTConstants.LOOPBACK_ADDRS_STRING + ";";
 				}
@@ -1481,9 +1477,8 @@ public class Tcpbw100 extends JApplet implements ActionListener {
 				try {
 					_sMidBoxTestResult += midSrvrSockObj.getInetAddress() + ";";
 				} catch (SecurityException e) {
-					System.err
-							.println("Unable to obtain Servers IP addresses: using "
-									+ sHostName);
+					_log.warn("Unable to obtain Servers IP addresses: using "
+									+ sHostName, e);
 					_sErrMsg = "getInetAddress() called failed\n";
 					_sMidBoxTestResult += sHostName + ";";
 					_resultsTxtPane.append(_resBundDisplayMsgs
@@ -1496,8 +1491,7 @@ public class Tcpbw100 extends JApplet implements ActionListener {
 				try {
 					_sMidBoxTestResult += midSrvrSockObj.getLocalAddress() + ";";
 				} catch (SecurityException e) {
-					System.err
-							.println("Unable to obtain local IP address: using 127.0.0.1");
+					_log.warn("Unable to obtain local IP address: using 127.0.0.1", e);
 					_sErrMsg = "getLocalAddress() call failed\n";
 					_sMidBoxTestResult += NDTConstants.LOOPBACK_ADDRS_STRING + ";";
 				}
@@ -2913,9 +2907,8 @@ public class Tcpbw100 extends JApplet implements ActionListener {
 				i++;
 			}
 		} catch (IOException e) {
-			System.err
-					.println("Couldn't complete tests while waiting for MSG_LOGOUT/MSG_RESULTS for "
-							+ sHostName);
+			_log.warn("Couldn't complete tests while waiting for MSG_LOGOUT/MSG_RESULTS for "
+							+ sHostName, e);
 			_sErrMsg = "Couldn't complete tests while waiting for MSG_LOGOUT/MSG_RESULTS for "
 					+ sHostName + ")\n";
 			_bFailed = true;
@@ -2937,8 +2930,7 @@ public class Tcpbw100 extends JApplet implements ActionListener {
 					+ ": 127.0.0.1\n");
 			_resultsTxtPane.append(_resBundDisplayMsgs
 					.getString("unableToObtainIP") + "\n");
-			System.err
-					.println("Unable to obtain local IP address: using 127.0.0.1");
+			_log.warn("Unable to obtain local IP address: using 127.0.0.1", e);
 		}
 
 		try {
-- 
GitLab