chore: complete update

This commit is contained in:
2025-07-17 16:24:20 +02:00
parent 899227b0a4
commit 64a7051137
1300 changed files with 85570 additions and 2756 deletions

View File

@@ -0,0 +1,37 @@
import {monitor} from "./frameloop";
export class Logger {
static enabled = true //import.meta.env.MODE !== 'production';
static log(...args) {
this._write('log', '[LOG]', args);
}
static warn(...args) {
this._write('warn', '[WARN]', args)
}
static info(...args) {
this._write('info', '[INFO]', args);
}
static error(...args) {
this._write('error', '[ERROR]', args);
}
static _write(consoleMethod, prefix, args) {
if(!this.enabled) return;
const date = new Date();
const timestamp = date.toLocaleTimeString('de-DE');
const msg = `${prefix} [${timestamp}] ${args.map(a => typeof a === 'object' ? JSON.stringify(a) : a).join(' ')}`;
if(typeof console[consoleMethod] === 'function') {
console[consoleMethod](msg);
}
monitor?.log(msg)
}
}