diff --git a/example/logging-example.js b/example/logging-example.js index f6b24c0..aaca4fe 100644 --- a/example/logging-example.js +++ b/example/logging-example.js @@ -6,7 +6,7 @@ const logging = require('../logging'); //---------------------------------------------------------------------------------------------------------------------- -logging.init({ debugStream: true, level: 'debug' }); +logging.init({ debug: true }); logging.setRootLogger('example'); //---------------------------------------------------------------------------------------------------------------------- diff --git a/example/null-logging-example.js b/example/null-logging-example.js index 1beb82e..2175906 100644 --- a/example/null-logging-example.js +++ b/example/null-logging-example.js @@ -6,7 +6,7 @@ const logging = require('../logging'); //---------------------------------------------------------------------------------------------------------------------- -logging.init({ debugStream: true, level: debug, nullLogger: true }); +logging.init({ debug: true, nullLogger: true }); logging.setRootLogger('example'); //---------------------------------------------------------------------------------------------------------------------- diff --git a/logging.js b/logging.js index 0aac5c6..c10869d 100644 --- a/logging.js +++ b/logging.js @@ -67,6 +67,7 @@ class LoggingService { { // Pull out the streams config, with sane defaults. const streams = ((config.logging || config).streams) || this.streams; + config.level = config.level || (config.debug ? 'debug' : 'info'); if(config.nullLogger) {