From e92afcb2037c2b534f2331855f3f9c70299baf9f Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Sun, 30 Apr 2017 16:49:23 -0700 Subject: [PATCH] Fix error logger to only log if error is non-null --- src/tor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tor.js b/src/tor.js index c8b2b835..d6c78d28 100644 --- a/src/tor.js +++ b/src/tor.js @@ -52,7 +52,9 @@ function getTorIPs(cb) { fs.writeFile(destination, ips.join("\n"), error => { - LOGGER.error("Failed to write to %s: %s", destination, error); + if (error) { + LOGGER.error("Failed to write to %s: %s", destination, error); + } }); return; }