diff --git a/src/appstore.js b/src/appstore.js index 4f13cfb43..694ccef03 100644 --- a/src/appstore.js +++ b/src/appstore.js @@ -413,7 +413,7 @@ function createTicket(info, auditSource, callback) { support.enableRemoteSupport(true, auditSource, function (error) { // ensure we can at least get the ticket through - if (error) console.error('Unable to enable SSH support.', error); + if (error) debug('Unable to enable SSH support.', error); callback(); }); diff --git a/src/apptaskmanager.js b/src/apptaskmanager.js index d3e49dbbe..d72fb54ce 100644 --- a/src/apptaskmanager.js +++ b/src/apptaskmanager.js @@ -78,7 +78,7 @@ function scheduleTask(appId, taskId, callback) { // post app task hooks sftp.rebuild(function (error) { - if (error) console.error('Unable to rebuild sftp:', error); + if (error) debug('Unable to rebuild sftp:', error); }); }); } diff --git a/src/volumes.js b/src/volumes.js index de126e7aa..f7ea25dab 100644 --- a/src/volumes.js +++ b/src/volumes.js @@ -9,10 +9,11 @@ exports = module.exports = { const assert = require('assert'), BoxError = require('./boxerror.js'), - volumedb = require('./volumedb.js'), + debug = require('debug')('box:volumes'), eventlog = require('./eventlog.js'), sftp = require('./sftp.js'), - uuid = require('uuid'); + uuid = require('uuid'), + volumedb = require('./volumedb.js'); function validateName(name) { assert.strictEqual(typeof name, 'string'); @@ -48,7 +49,7 @@ function add(name, hostPath, auditSource, callback) { if (error) return callback(error); eventlog.add(eventlog.ACTION_VOLUME_ADD, auditSource, { id, name, hostPath }); - sftp.rebuild((error) => { if (error) console.error('Unable to rebuild sftp:', error); }); + sftp.rebuild((error) => { if (error) debug('Unable to rebuild sftp:', error); }); callback(null, id); }); @@ -84,7 +85,7 @@ function del(volume, auditSource, callback) { if (error) return callback(error); eventlog.add(eventlog.ACTION_VOLUME_REMOVE, auditSource, { volume }); - sftp.rebuild((error) => { if (error) console.error('Unable to rebuild sftp:', error); }); + sftp.rebuild((error) => { if (error) debug('Unable to rebuild sftp:', error); }); return callback(null); });