mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 20:59:54 +01:00
Less verbose logging for plugins.
This commit is contained in:
@@ -494,7 +494,7 @@ class TorPlugin implements DuplexPlugin, EventHandler {
|
|||||||
s = ss.accept();
|
s = ss.accept();
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
// This is expected when the socket is closed
|
// 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);
|
tryToClose(ss);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -584,7 +584,7 @@ class TorPlugin implements DuplexPlugin, EventHandler {
|
|||||||
if(LOG.isLoggable(INFO)) LOG.info("Connected to " + onion);
|
if(LOG.isLoggable(INFO)) LOG.info("Connected to " + onion);
|
||||||
return new TorTransportConnection(this, s);
|
return new TorTransportConnection(this, s);
|
||||||
} catch(IOException e) {
|
} 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;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ abstract class TcpPlugin implements DuplexPlugin {
|
|||||||
s = ss.accept();
|
s = ss.accept();
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
// This is expected when the socket is closed
|
// 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);
|
tryToClose(ss);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -188,7 +188,7 @@ abstract class TcpPlugin implements DuplexPlugin {
|
|||||||
if(LOG.isLoggable(INFO)) LOG.info("Connected to " + addr);
|
if(LOG.isLoggable(INFO)) LOG.info("Connected to " + addr);
|
||||||
return new TcpTransportConnection(this, s);
|
return new TcpTransportConnection(this, s);
|
||||||
} catch(IOException e) {
|
} 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;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ class BluetoothPlugin implements DuplexPlugin {
|
|||||||
s = ss.acceptAndOpen();
|
s = ss.acceptAndOpen();
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
// This is expected when the socket is closed
|
// 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);
|
tryToClose(ss);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -208,10 +208,13 @@ class BluetoothPlugin implements DuplexPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private StreamConnection connect(String url) {
|
private StreamConnection connect(String url) {
|
||||||
|
if(LOG.isLoggable(INFO)) LOG.info("Connecting to " + url);
|
||||||
try {
|
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) {
|
} 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;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -374,7 +377,7 @@ class BluetoothPlugin implements DuplexPlugin {
|
|||||||
}
|
}
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
// This is expected when the socket is closed
|
// 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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user