Use correct debug level

This commit is contained in:
Iwan Timmer
2014-08-07 16:29:34 +02:00
parent 4d03be551f
commit 09f3f851fd

View File

@@ -33,6 +33,7 @@ public class Limelight implements NvConnectionListener {
private String host;
private NvConnection conn;
private boolean connectionTerminating;
private Logger logger;
/**
* Constructs a new instance based on the given host
@@ -292,12 +293,13 @@ public class Limelight implements NvConnectionListener {
System.exit(5);
}
//Set debugging level
Logger.getLogger(LimeLog.class.getName()).setLevel(debug);
StreamConfiguration streamConfig = new StreamConfiguration("Steam", width, height, refresh, bitrate);
Limelight limelight = new Limelight(host);
//Set debugging level
limelight.setLevel(debug);
if (!pair)
if (fake)
limelight.startUpFake(streamConfig, video);
@@ -306,8 +308,14 @@ public class Limelight implements NvConnectionListener {
else
limelight.pair();
}
public void setLevel(Level level) {
if (logger==null)
logger = Logger.getLogger(LimeLog.class.getName());
logger.setLevel(level);
}
public void stop() {
connectionTerminating = true;
conn.stop();