mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Enabled logging in non-JUnit modem tests.
This commit is contained in:
@@ -68,6 +68,8 @@ class ModemPlugin implements DuplexPlugin, Modem.Callback {
|
||||
|
||||
public boolean start() {
|
||||
for(String portName : SerialPortList.getPortNames()) {
|
||||
if(LOG.isLoggable(INFO))
|
||||
LOG.info("Trying to initialise modem on " + portName);
|
||||
modem = modemFactory.createModem(this, portName);
|
||||
try {
|
||||
modem.init();
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
package net.sf.briar.plugins.modem;
|
||||
|
||||
import static java.util.logging.Level.INFO;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import net.sf.briar.api.ContactId;
|
||||
import net.sf.briar.api.TransportConfig;
|
||||
@@ -33,6 +36,7 @@ public class ModemClientTest extends DuplexClientTest {
|
||||
System.err.println("Please specify the server's phone number");
|
||||
System.exit(1);
|
||||
}
|
||||
Logger.getLogger("net.sf.briar").setLevel(INFO);
|
||||
ExecutorService executor = Executors.newCachedThreadPool();
|
||||
try {
|
||||
new ModemClientTest(executor, args[0]).run();
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package net.sf.briar.plugins.modem;
|
||||
|
||||
import static java.util.logging.Level.INFO;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import net.sf.briar.api.TransportConfig;
|
||||
import net.sf.briar.api.TransportProperties;
|
||||
@@ -23,6 +26,7 @@ public class ModemServerTest extends DuplexServerTest {
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
Logger.getLogger("net.sf.briar").setLevel(INFO);
|
||||
ExecutorService executor = Executors.newCachedThreadPool();
|
||||
try {
|
||||
new ModemServerTest(executor).run();
|
||||
|
||||
Reference in New Issue
Block a user