git ssb

4+

Dominic / scuttlebot



Commit 461490d0f31d18bc7737f392fabdb1503085337a

Handle non-existent conf.logging

Julia Friesel committed on 4/14/2018, 10:12:06 AM
Parent: 5d199dd6f09c4e76f752a63c134177543d101688

Files changed

plugins/logging.jschanged
plugins/logging.jsView
@@ -51,10 +51,13 @@
5151 }
5252 }
5353
5454 module.exports = function logging (server, conf) {
55- var level = conf.logging && conf.logging.level ? conf.logging.level : DEFAULT_LEVEL
56- level = LOG_LEVELS.indexOf(level)
55+ if (conf.logging && conf.logging.level) {
56+ level = LOG_LEVELS.indexOf(conf.logging.level)
57+ } else {
58+ level = DEFAULT_LEVEL
59+ }
5760
5861 if (level === -1) {
5962 console.log('Warning, logging.level configured to an invalid value:', conf.logging.level)
6063 console.log('Should be one of:', LOG_LEVELS.join(', '))

Built with git-ssb-web