From 4e8225a709a1084f15d12cdf15ee4d42cd74a8a1 Mon Sep 17 00:00:00 2001 From: Tom Kirkpatrick Date: Sun, 16 Sep 2018 23:19:47 +0200 Subject: [PATCH] fix(log): output logs in production mode Ensure that logs are output when the app is run in production mode. not only development mode so that its easier to diagnose an issue with a production build. --- app/lib/lnd/neutrino.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/app/lib/lnd/neutrino.js b/app/lib/lnd/neutrino.js index 4cf87fa0..6b6856e4 100644 --- a/app/lib/lnd/neutrino.js +++ b/app/lib/lnd/neutrino.js @@ -113,22 +113,18 @@ class Neutrino extends EventEmitter { // Listen for when neutrino prints data to stderr. this.process.stderr.pipe(split2()).on('data', line => { - if (process.env.NODE_ENV === 'development') { - lndLog.error(line) - if (line.startsWith('panic:')) { - this.lastError = line - } + lndLog.error(line) + if (line.startsWith('panic:')) { + this.lastError = line } }) // Listen for when neutrino prints data to stdout. this.process.stdout.pipe(split2()).on('data', line => { - if (process.env.NODE_ENV === 'development') { - const level = lndLogGetLevel(line) - lndLog[level](line) - if (level === 'error') { - this.lastError = line.split('[ERR] LTND:')[1] - } + const level = lndLogGetLevel(line) + lndLog[level](line) + if (level === 'error') { + this.lastError = line.split('[ERR] LTND:')[1] } // password RPC server listening (wallet unlocker started).