* Clean up some logs

* Add serializer for 'err' in logs for passing full err object
* Don't dump HUGE message lists to log during new scan
This commit is contained in:
Bryan Ashby 2016-07-16 13:05:32 -06:00
parent 14c8b39a9e
commit 485711b5da
4 changed files with 44 additions and 19 deletions

View file

@ -24,7 +24,9 @@ function loadModuleEx(options, cb) {
const modConfig = _.isObject(Config[options.category]) ? Config[options.category][options.name] : null;
if(_.isObject(modConfig) && false === modConfig.enabled) {
return cb(new Error(`Module "${options.name}" is disabled`));
const err = new Error(`Module "${options.name}" is disabled`);
err.code = 'EENIGMODDISABLED';
return cb(err);
}
//