fix: better validation of events + clean up (#267)

This commit is contained in:
Carl-Gerhard Lindesvärd
2026-01-07 11:58:11 +01:00
parent 6d9e3ce8e5
commit 3c085e445d
22 changed files with 387 additions and 387 deletions

View File

@@ -8,6 +8,13 @@ export type ILogger = winston.Logger;
const logLevel = process.env.LOG_LEVEL ?? 'info';
const silent = process.env.LOG_SILENT === 'true';
// Add colors for custom levels (fatal, warn, trace) that aren't in default color schemes
winston.addColors({
fatal: 'red',
warn: 'yellow',
trace: 'gray',
});
export function createLogger({ name }: { name: string }): ILogger {
const service = [process.env.LOG_PREFIX, name, process.env.NODE_ENV ?? 'dev']
.filter(Boolean)