Logging: filter for loglevel

This commit is contained in:
2025-10-09 13:07:51 +02:00
parent 10a19717ad
commit 4986ee0ea5

View File

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