Files
MagicMirror/js
Kristjan ESPERANTO e7503a457b refactor: further logger clean-up (#4050)
After #4049 here are two small follow-up improvements to `js/logger.js`.

**1. Simpler bind syntax** —
`Function.prototype.bind.call(console.debug, console)` is an archaic
pattern. The equivalent `console.debug.bind(console)` works fine in all
supported engines (Node.js ≥ 22, modern browsers) and is much easier to
read. Also: `console.timeStamp` exists in all supported environments, so
the conditional fallback to an empty function is no longer needed.

**2. Simpler `setLogLevel`** — instead of iterating over all keys in the
logger object and permanently overwriting them, the method now loops
over the five log-level keys explicitly and rebinds from `console[key]`.
This makes the filtered set obvious at a glance and ensures utility
methods like `group`, `time`, and `timeStamp` are never accidentally
silenced — they're structural helpers, not log levels.
2026-03-06 18:56:16 +01:00
..
2024-08-12 22:52:43 +02:00
2026-02-06 00:09:59 +01:00
2026-02-06 00:09:59 +01:00