Files
Felix Förtsch 3682ee98e0
All checks were successful
Build and Push Docker Image / build (push) Successful in 15s
add structured logging with timestamps for docker/unraid log viewer
all server output now prefixed with ISO timestamp and level [INFO/WARN/ERROR].
logs requests, scan start/complete, job lifecycle, errors. skips noisy SSE
endpoints.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 17:29:22 +01:00

18 lines
487 B
TypeScript

/** Simple structured logger that outputs timestamped lines to stdout/stderr. */
function ts(): string {
return new Date().toISOString();
}
export function log(msg: string, ...args: unknown[]): void {
console.log(`${ts()} [INFO] ${msg}`, ...args);
}
export function warn(msg: string, ...args: unknown[]): void {
console.warn(`${ts()} [WARN] ${msg}`, ...args);
}
export function error(msg: string, ...args: unknown[]): void {
console.error(`${ts()} [ERROR] ${msg}`, ...args);
}