diff --git a/briar-android/src/org/briarproject/plugins/tor/TorPlugin.java b/briar-android/src/org/briarproject/plugins/tor/TorPlugin.java index 80ac29e959d5a1c7f1e892eb8d7b9bc31789fcda..6112889ffb7a654ff8743d64fca94047009387a7 100644 --- a/briar-android/src/org/briarproject/plugins/tor/TorPlugin.java +++ b/briar-android/src/org/briarproject/plugins/tor/TorPlugin.java @@ -494,7 +494,7 @@ class TorPlugin implements DuplexPlugin, EventHandler { s = ss.accept(); } catch(IOException e) { // This is expected when the socket is closed - if(LOG.isLoggable(INFO)) LOG.log(INFO, e.toString(), e); + if(LOG.isLoggable(INFO)) LOG.info(e.toString()); tryToClose(ss); return; } @@ -584,7 +584,7 @@ class TorPlugin implements DuplexPlugin, EventHandler { if(LOG.isLoggable(INFO)) LOG.info("Connected to " + onion); return new TorTransportConnection(this, s); } catch(IOException e) { - if(LOG.isLoggable(INFO)) LOG.log(INFO, e.toString(), e); + if(LOG.isLoggable(INFO)) LOG.info("Could not connect to " + onion); return null; } } diff --git a/briar-core/src/org/briarproject/plugins/tcp/TcpPlugin.java b/briar-core/src/org/briarproject/plugins/tcp/TcpPlugin.java index 13401c290c7a3f873e41cc3ff618de7ec8a32521..10f93174322b48879bb80b82cbf6e66ef0133508 100644 --- a/briar-core/src/org/briarproject/plugins/tcp/TcpPlugin.java +++ b/briar-core/src/org/briarproject/plugins/tcp/TcpPlugin.java @@ -129,7 +129,7 @@ abstract class TcpPlugin implements DuplexPlugin { s = ss.accept(); } catch(IOException e) { // This is expected when the socket is closed - if(LOG.isLoggable(INFO)) LOG.log(INFO, e.toString(), e); + if(LOG.isLoggable(INFO)) LOG.info(e.toString()); tryToClose(ss); return; } @@ -188,7 +188,7 @@ abstract class TcpPlugin implements DuplexPlugin { if(LOG.isLoggable(INFO)) LOG.info("Connected to " + addr); return new TcpTransportConnection(this, s); } catch(IOException e) { - if(LOG.isLoggable(INFO)) LOG.log(INFO, e.toString(), e); + if(LOG.isLoggable(INFO)) LOG.info("Could not connect to " + addr); return null; } } diff --git a/briar-desktop/src/org/briarproject/plugins/bluetooth/BluetoothPlugin.java b/briar-desktop/src/org/briarproject/plugins/bluetooth/BluetoothPlugin.java index 4572df83e13c2a3213af9f8da414f6553bb6b3a6..ba082128bacec21cd813c882ca66e82fd4b8166d 100644 --- a/briar-desktop/src/org/briarproject/plugins/bluetooth/BluetoothPlugin.java +++ b/briar-desktop/src/org/briarproject/plugins/bluetooth/BluetoothPlugin.java @@ -154,7 +154,7 @@ class BluetoothPlugin implements DuplexPlugin { s = ss.acceptAndOpen(); } catch(IOException e) { // This is expected when the socket is closed - if(LOG.isLoggable(INFO)) LOG.log(INFO, e.toString(), e); + if(LOG.isLoggable(INFO)) LOG.info(e.toString()); tryToClose(ss); return; } @@ -208,10 +208,13 @@ class BluetoothPlugin implements DuplexPlugin { } private StreamConnection connect(String url) { + if(LOG.isLoggable(INFO)) LOG.info("Connecting to " + url); try { - return (StreamConnection) Connector.open(url); + StreamConnection s = (StreamConnection) Connector.open(url); + if(LOG.isLoggable(INFO)) LOG.info("Connected to " + url); + return s; } catch(IOException e) { - if(LOG.isLoggable(WARNING)) LOG.log(WARNING, e.toString(), e); + if(LOG.isLoggable(INFO)) LOG.info("Could not connect to " + url); return null; } } @@ -374,7 +377,7 @@ class BluetoothPlugin implements DuplexPlugin { } } catch(IOException e) { // This is expected when the socket is closed - if(LOG.isLoggable(INFO)) LOG.log(INFO, e.toString(), e); + if(LOG.isLoggable(INFO)) LOG.info(e.toString()); } } }