Skip to content
Snippets Groups Projects
Commit 27dab9cc authored by Mark Winter's avatar Mark Winter
Browse files

Added information logging to IJ debug-mode

parent 4b266e3b
No related branches found
No related tags found
No related merge requests found
......@@ -116,6 +116,9 @@ public class LeverscIJ implements PlugInFilter
int port = base_port + fignum;
URL url = new URL("http", host, port, "/loadfig");
if ( IJ.debugMode )
IJ.log(String.format("LEVERSC send: %s", url.toString()));
String boundary = "---------------Leversc_" + UUID.randomUUID().toString();
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
......@@ -134,7 +137,8 @@ public class LeverscIJ implements PlugInFilter
// TODO: We don't curently do anything with this response code, but it's important to retrieve it for proper data transmission
int status = conn.getResponseCode();
// IJ.log(String.format("LEVERSC response: %d", status));
if ( IJ.debugMode )
IJ.log(String.format("LEVERSC response: %d", status));
conn.disconnect();
}
......@@ -320,7 +324,8 @@ public class LeverscIJ implements PlugInFilter
final Genson genson = new Genson();
String json = genson.serialize(meta);
// IJ.log(String.format("JSON: %s", json));
if ( IJ.debugMode )
IJ.log(String.format("LEVERSC JSON Header: %s", json));
return json;
}
......@@ -377,6 +382,7 @@ public class LeverscIJ implements PlugInFilter
conn.setConnectTimeout(500);
BufferedReader resp_reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
// TODO: We should verify a version string here once that is properly returned by LEVERSC
String resp = read_all_buffered(resp_reader);
resp_reader.close();
......
......@@ -145,7 +145,8 @@ public class LeverscLaunch
private static boolean exec_process(List<String> cmdArgs)
{
IJ.log(String.format("Run Leversc: %s", cmdArgs.toString()));
if ( IJ.debugMode )
IJ.log(String.format("Launching Leversc: %s", cmdArgs.toString()));
String[] strArgs = new String[cmdArgs.size()];
strArgs = cmdArgs.toArray(strArgs);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment