Skip to content
Snippets Groups Projects
Commit 2945cb4a authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added better debug information for the R scripts

parent 41064621
No related branches found
No related tags found
No related merge requests found
......@@ -313,10 +313,12 @@ object VcfStats extends ToolCommand {
val command: String = "Rscript " + file + " " + args.mkString(" ")
val stdout = new StringBuffer()
val stderr = new StringBuffer()
val process = Process(command)
process.run(ProcessLogger(stdout append _ + "\n", stderr append _ + "\n"))
logger.debug("Version command: \n" + command + "\n output log: \n stdout: \n" + stdout.toString + "\n stderr: \n" + stderr.toString)
logger.info("Starting: " + command)
val process = Process(command).run(ProcessLogger(x => logger.debug(x), x => logger.debug(x)))
if (process.exitValue() == 0) logger.info("Done: " + command)
else {
logger.warn("Failed: " + command)
if (!logger.isDebugEnabled) logger.warn("Use -l debug for more info")
}
}
}
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