Commit cc1c1a9d authored by dev0tion's avatar dev0tion

Fix stdout logging

parent 18913d1b
......@@ -150,15 +150,10 @@ function startBitcoinApi() {
bitcoinProcess = spawnBitcoin(apiPath, ['-testnet'], {
detached: true
}, (error, stdout, stderr) => {
if (error) {
writeLogError(`exec error: ${error}`);
return;
}
if (serve) {
writeLog(`stdout: ${stdout}`);
writeLog(`stderr: ${stderr}`);
}
});
bitcoinProcess.stdout.on('data', (data) => {
writeLog(`Bitcoin: ${data}`);
});
}
......@@ -174,15 +169,10 @@ function startStratisApi() {
stratisProcess = spawnStratis(apiPath, ['stratis', '-testnet'], {
detached: true
}, (error, stdout, stderr) => {
if (error) {
writeLogError(`exec error: ${error}`);
return;
}
if (serve) {
writeLog(`stdout: ${stdout}`);
writeLog(`stderr: ${stderr}`);
}
});
stratisProcess.stdout.on('data', (data) => {
writeLog(`Stratis: ${data}`);
});
}
......@@ -228,10 +218,6 @@ function writeLog(msg) {
console.log(msg);
};
function writeLogError(msg) {
console.error(msg);
};
function createMenu() {
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