Log the server socket details to make it easier to run manual tests

between two machines.
This commit is contained in:
akwizgran
2011-12-09 20:41:05 +00:00
parent f9f41acde9
commit 2014235b86
3 changed files with 6 additions and 3 deletions

View File

@@ -64,6 +64,8 @@ class BluetoothPlugin implements StreamPlugin {
synchronized(this) { synchronized(this) {
running = true; running = true;
localDevice = LocalDevice.getLocalDevice(); localDevice = LocalDevice.getLocalDevice();
if(LOG.isLoggable(Level.INFO))
LOG.info("Address " + localDevice.getBluetoothAddress());
} }
} catch(UnsatisfiedLinkError e) { } catch(UnsatisfiedLinkError e) {
// On Linux the user may need to install libbluetooth-dev // On Linux the user may need to install libbluetooth-dev

View File

@@ -80,6 +80,10 @@ abstract class SocketPlugin implements StreamPlugin {
} }
socket = ss; socket = ss;
} }
if(LOG.isLoggable(Level.INFO)) {
LOG.info("Listening on " + ss.getInetAddress().getHostAddress()
+ ":" + ss.getLocalPort());
}
setLocalSocketAddress(ss.getLocalSocketAddress()); setLocalSocketAddress(ss.getLocalSocketAddress());
acceptContactConnections(ss); acceptContactConnections(ss);
} }

View File

@@ -16,9 +16,6 @@ public abstract class StreamServerTest extends StreamTest {
// Start the plugin // Start the plugin
System.out.println("Starting plugin"); System.out.println("Starting plugin");
plugin.start(); plugin.start();
// Print the local transport properties
System.out.println("Local transport properties:");
System.out.println(callback.getLocalProperties());
// Wait for a connection // Wait for a connection
System.out.println("Waiting for connection"); System.out.println("Waiting for connection");
synchronized(callback) { synchronized(callback) {