Logging: filter for loglevel
This commit is contained in:
@@ -8,7 +8,11 @@ class trweb {
|
||||
#loadcb = function(key) {return localStorage.getItem(`trweb.${key}`)};
|
||||
#savecb = function(key, value) {localStorage.setItem(`trweb.${key}`, value)};
|
||||
#logger = function(msg) {};
|
||||
#logcb = function(module, loglevel, msg) {this.#logger(`${module}: ${msg}`)}.bind(this);
|
||||
#logcb = function(module, loglevel, msg) {
|
||||
if (loglevel <= 5) {
|
||||
this.#logger(`${module}: ${msg}`);
|
||||
}
|
||||
}.bind(this);
|
||||
|
||||
#timer;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user