Disable logging

This commit is contained in:
Tamius Han 2019-09-17 22:18:02 +02:00
parent 7d63245136
commit 536e726f4b
5 changed files with 23 additions and 11 deletions

View File

@ -29,8 +29,10 @@ class Logger {
}
async init() {
if (!this.conf) {
this.conf = await this.getSaved();
}
}
clear() {
this.log = [];

View File

@ -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});

View File

@ -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();
}

View File

@ -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});

View File

@ -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});