From 4986ee0ea5a00f88d32ba67f0cc8f45e8094f9b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Feh=C3=A9r=20Roland?= Date: Thu, 9 Oct 2025 13:07:51 +0200 Subject: [PATCH] Logging: filter for loglevel --- js/trweb.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/trweb.js b/js/trweb.js index cb74bc5..7b02ef3 100644 --- a/js/trweb.js +++ b/js/trweb.js @@ -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;