mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 03:39:05 +01:00
Skip a logging method if logging is disabled.
This commit is contained in:
@@ -186,7 +186,7 @@ class TorPlugin implements DuplexPlugin, EventHandler {
|
|||||||
// Wait for the auth cookie file to be created/updated
|
// Wait for the auth cookie file to be created/updated
|
||||||
if(!latch.await(COOKIE_TIMEOUT, MILLISECONDS)) {
|
if(!latch.await(COOKIE_TIMEOUT, MILLISECONDS)) {
|
||||||
LOG.warning("Auth cookie not created");
|
LOG.warning("Auth cookie not created");
|
||||||
listFiles(torDirectory);
|
if(LOG.isLoggable(INFO)) listFiles(torDirectory);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch(InterruptedException e1) {
|
} catch(InterruptedException e1) {
|
||||||
@@ -337,8 +337,8 @@ class TorPlugin implements DuplexPlugin, EventHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void listFiles(File f) {
|
private void listFiles(File f) {
|
||||||
if(f.isDirectory()) for(File f1 : f.listFiles()) listFiles(f1);
|
if(f.isDirectory()) for(File child : f.listFiles()) listFiles(child);
|
||||||
else if(LOG.isLoggable(INFO)) LOG.info(f.getAbsolutePath());
|
else LOG.info(f.getAbsolutePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
private byte[] read(File f) throws IOException {
|
private byte[] read(File f) throws IOException {
|
||||||
@@ -491,7 +491,7 @@ class TorPlugin implements DuplexPlugin, EventHandler {
|
|||||||
// Wait for the hostname file to be created/updated
|
// Wait for the hostname file to be created/updated
|
||||||
if(!latch.await(HOSTNAME_TIMEOUT, MILLISECONDS)) {
|
if(!latch.await(HOSTNAME_TIMEOUT, MILLISECONDS)) {
|
||||||
LOG.warning("Hidden service not created");
|
LOG.warning("Hidden service not created");
|
||||||
listFiles(torDirectory);
|
if(LOG.isLoggable(INFO)) listFiles(torDirectory);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!running) return;
|
if(!running) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user