diff --git a/lib/modules/ipfs/index.js b/lib/modules/ipfs/index.js index bbeeecf5..f28dd881 100644 --- a/lib/modules/ipfs/index.js +++ b/lib/modules/ipfs/index.js @@ -48,8 +48,8 @@ class IPFS { }); self.events.request("services:register", 'IPFS', function (cb) { - self.logger.trace("Checking IPFS version..."); let url = (self.protocol || 'http') + '://' + self.host + ':' + self.port + '/api/v0/version'; + self.logger.trace(`Checking IPFS version on ${url}...`); if(self.protocol !== 'https'){ utils.httpGetJson(url, versionCb); } else { @@ -61,8 +61,10 @@ class IPFS { return cb({name: "IPFS ", status: 'off'}); } if (body.Version) { + self.logger.trace("Swarm available"); return cb({name: ("IPFS " + body.Version), status: 'on'}); } + self.logger.trace("Swarm available"); return cb({name: "IPFS ", status: 'on'}); } }); diff --git a/lib/modules/swarm/index.js b/lib/modules/swarm/index.js index 59b3b9d8..d5affec6 100644 --- a/lib/modules/swarm/index.js +++ b/lib/modules/swarm/index.js @@ -54,8 +54,9 @@ class Swarm { }); self.events.request("services:register", 'Swarm', function(cb){ - self.logger.trace("Checking Swarm availability..."); + self.logger.trace(`Checking Swarm availability on ${self.bzz.currentProvider}...`); self.bzz.isAvailable().then(result => { + self.logger.trace("Swarm " + (result ? '':'un') + "available"); return cb({name: "Swarm ", status: result ? 'on':'off'}); }).catch(err => { self.logger.trace("Check Swarm availability error: " + err); diff --git a/lib/processes/storageProcesses/ipfs.js b/lib/processes/storageProcesses/ipfs.js index 93350502..83fedc2a 100644 --- a/lib/processes/storageProcesses/ipfs.js +++ b/lib/processes/storageProcesses/ipfs.js @@ -51,8 +51,9 @@ class IPFSProcess extends ProcessWrapper { self.readyCalled = true; // update IPFS cors before spawning a daemon (muhaha) - console.log(`RUNNING IPFS CORS UPDATE COMMAND: ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "[\\"${self.cors.join('\\", \\"')}\\"]"`); - child_process.exec(`ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "[\\"${self.cors.join('\\", \\"')}\\"]"`, {silent: true}, (err, stdout, _stderr) => { + let ipfsCorsCmd = `ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "[\\"${self.cors.join('\\", \\"')}\\"]"`; + console.trace(`Updating IPFS CORS using command: ${ipfsCorsCmd}`); + child_process.exec(ipfsCorsCmd, {silent: true}, (err, stdout, _stderr) => { if(err){ err = err.toString(); console.error('IPFS CORS update error: ', err);