From c5fcb7027fa5f8d48264eb54aad93a9cbaaf2d8b Mon Sep 17 00:00:00 2001 From: Alan K Date: Sun, 19 Jul 2015 22:53:13 -0400 Subject: [PATCH] Log stdout/stderr Only if there's something to print --- plotter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plotter.js b/plotter.js index d365941..9ee7041 100644 --- a/plotter.js +++ b/plotter.js @@ -128,8 +128,8 @@ function setup_gnuplot(gnuplot, options) { */ function post_gnuplot_processing(error, stdout, stderr) { /* Print stuff */ - console.log('stdout: ' + stdout); - console.log('stderr: ' + stderr); + if(stdout) console.log('stdout: ' + stdout); + if(stderr) console.log('stderr: ' + stderr); if (error !== null) { console.log('exec error: ' + error); }