All checks were successful
Build and Push Docker Image / build (push) Successful in 15s
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>
18 lines
487 B
TypeScript
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);
|
|
}
|