Commit cc1c1a9d authored by dev0tion's avatar dev0tion

Fix stdout logging

parent 18913d1b
...@@ -150,15 +150,10 @@ function startBitcoinApi() { ...@@ -150,15 +150,10 @@ function startBitcoinApi() {
bitcoinProcess = spawnBitcoin(apiPath, ['-testnet'], { bitcoinProcess = spawnBitcoin(apiPath, ['-testnet'], {
detached: true detached: true
}, (error, stdout, stderr) => { });
if (error) {
writeLogError(`exec error: ${error}`); bitcoinProcess.stdout.on('data', (data) => {
return; writeLog(`Bitcoin: ${data}`);
}
if (serve) {
writeLog(`stdout: ${stdout}`);
writeLog(`stderr: ${stderr}`);
}
}); });
} }
...@@ -174,15 +169,10 @@ function startStratisApi() { ...@@ -174,15 +169,10 @@ function startStratisApi() {
stratisProcess = spawnStratis(apiPath, ['stratis', '-testnet'], { stratisProcess = spawnStratis(apiPath, ['stratis', '-testnet'], {
detached: true detached: true
}, (error, stdout, stderr) => { });
if (error) {
writeLogError(`exec error: ${error}`); stratisProcess.stdout.on('data', (data) => {
return; writeLog(`Stratis: ${data}`);
}
if (serve) {
writeLog(`stdout: ${stdout}`);
writeLog(`stderr: ${stderr}`);
}
}); });
} }
...@@ -228,10 +218,6 @@ function writeLog(msg) { ...@@ -228,10 +218,6 @@ function writeLog(msg) {
console.log(msg); console.log(msg);
}; };
function writeLogError(msg) {
console.error(msg);
};
function createMenu() { function createMenu() {
const Menu = electron.Menu; const Menu = electron.Menu;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment