From 1df624cbc4b716e799d3d6a5171cacf3b046769c Mon Sep 17 00:00:00 2001 From: Iwan Timmer Date: Mon, 17 Feb 2014 16:41:48 +0100 Subject: [PATCH] Set debug level --- src/com/limelight/Limelight.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/com/limelight/Limelight.java b/src/com/limelight/Limelight.java index 56d4159..d66c9b2 100644 --- a/src/com/limelight/Limelight.java +++ b/src/com/limelight/Limelight.java @@ -20,6 +20,8 @@ import java.net.SocketException; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; import org.xmlpull.v1.XmlPullParserException; /** @@ -166,6 +168,7 @@ public class Limelight implements NvConnectionListener { boolean fake = false; String mapping = null; String audio = "hw:0,0"; + Level debug = Level.SEVERE; for (int i = 0; i < args.length - 1; i++) { if (args[i].equals("-input")) { @@ -204,6 +207,10 @@ public class Limelight implements NvConnectionListener { refresh = 60; } else if (args[i].equals("-fake")) { fake = true; + } else if (args[i].equals("-v")) { + debug = Level.WARNING; + } else if (args[i].equals("-vv")) { + debug = Level.ALL; } else { System.out.println("Syntax Error: Unrecognized argument: " + args[i]); parse = false; @@ -227,6 +234,9 @@ public class Limelight implements NvConnectionListener { } else host = args[args.length-1]; + //Set debugging level + Logger.getLogger(LimeLog.class.getName()).setLevel(debug); + StreamConfiguration streamConfig = new StreamConfiguration((resolution/9)*16, resolution, refresh); Limelight limelight = new Limelight(host);