diff --git a/src/ext/lib/Logger.js b/src/ext/lib/Logger.js index 8722324..104e4a0 100644 --- a/src/ext/lib/Logger.js +++ b/src/ext/lib/Logger.js @@ -29,7 +29,9 @@ class Logger { } async init() { - this.conf = await this.getSaved(); + if (!this.conf) { + this.conf = await this.getSaved(); + } } clear() { diff --git a/src/ext/uw-bg.js b/src/ext/uw-bg.js index bb3d7d4..3045bf1 100644 --- a/src/ext/uw-bg.js +++ b/src/ext/uw-bg.js @@ -31,7 +31,10 @@ class UWServer { async setup() { // logger is the first thing that goes up - this.logger = new Logger(); + this.logger = new Logger({ + logToFile: false, + logToConsole: false + }); await this.logger.init(); this.settings = new Settings({logger: this.logger}); diff --git a/src/ext/uw.js b/src/ext/uw.js index 1dec571..c9b5426 100644 --- a/src/ext/uw.js +++ b/src/ext/uw.js @@ -44,7 +44,7 @@ class UW { if (!this.logger) { const loggingOptions = { logToFile: false, - logToConsole: true, + logToConsole: false, fileOptions: { // really the same stuff as consoleOptions }, @@ -52,14 +52,15 @@ class UW { enabled: true, // if logging is enabled at all 'debug': true, 'init': true, + 'settings': true, 'keyboard': false, 'mousemove': false, 'actionHandler': false, - 'comms': true, - 'playerDetect': true, - 'resizer': true, - 'scaler': true, - 'stretcher': true, + 'comms': false, + 'playerDetect': false, + // 'resizer': true, + // 'scaler': true, + // 'stretcher': true, 'videoRescan': false, 'arDetect': false, 'arDetect_verbose': false, @@ -86,7 +87,7 @@ class UW { if (!this.settings) { var ths = this; - this.settings = new Settings({updateCallback: () => ths.init(), logger: this.logger}); + this.settings = new Settings({updateCallback: (s) => {console.log("settings callback — ", s); ths.init()}, logger: this.logger}); await this.settings.init(); } diff --git a/src/options/App.vue b/src/options/App.vue index f1a8471..f37acbb 100644 --- a/src/options/App.vue +++ b/src/options/App.vue @@ -149,7 +149,10 @@ export default { } }, async created () { - this.logger = new Logger(); + this.logger = new Logger({ + logToFile: false, + logToConsole: false + }); await this.logger.init(); this.settings = new Settings({updateCallback: this.updateSettings, logger: this.logger}); diff --git a/src/popup/App.vue b/src/popup/App.vue index 60c20bd..6265dd9 100644 --- a/src/popup/App.vue +++ b/src/popup/App.vue @@ -205,7 +205,10 @@ export default { } }, async created() { - this.logger = new Logger(); + this.logger = new Logger({ + logToFile: false, + logToConsole: false + }); await this.logger.init(); this.settings = new Settings({updateCallback: () => this.updateConfig(), logger: this.logger});