From d6201dc2acee044f6b16f205b673d542ec2db557 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Wed, 15 Jan 2020 21:09:12 +0100 Subject: [PATCH] Add override to log everything --- src/ext/lib/Logger.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ext/lib/Logger.js b/src/ext/lib/Logger.js index 6a3663a..15297ec 100644 --- a/src/ext/lib/Logger.js +++ b/src/ext/lib/Logger.js @@ -7,10 +7,16 @@ class Logger { if (conf) { this.conf = conf; } + if (this.conf.consoleOptions === undefined) { + this.conf.consoleOptions = {}; + } + if (!this.conf.fileOptions === undefined) { + this.conf.fileOptions = {}; + } this.history = []; this.startTime = performance.now(); this.temp_disable = false; - this.stopTime = confTimeout ? performance.now() + (conf.timeout * 1000) : undefined; + this.stopTime = conf.timeout ? performance.now() + (conf.timeout * 1000) : undefined; } initLogger() { @@ -155,8 +161,10 @@ class Logger { } } } else { - return this.conf.consoleOptions[component]; + return this.conf.consoleOptions[component] !== undefined ? this.conf.consoleOptions[component] : this.conf.logAll; } + + return this.conf.logAll; } // level is unused as of now, but this may change in the future