From e4b1bcc677879705aab47df5e2bdc710455f6636 Mon Sep 17 00:00:00 2001 From: 0d0 <0d0acre@esiliati.org> Date: Tue, 25 Feb 2025 14:25:27 +0100 Subject: [PATCH] Configure winston --- src/lib/server/helpers.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/server/helpers.ts b/src/lib/server/helpers.ts index 09cc730..7474981 100644 --- a/src/lib/server/helpers.ts +++ b/src/lib/server/helpers.ts @@ -1,5 +1,11 @@ import formats from '$lib/common/supportedFormats.json'; +import winston from 'winston'; +export const logger = winston.createLogger({ + level: 'debug', + format: winston.format.json(), + transports: [new winston.transports.Console()], +}); const formatMime = new Map(Object.entries(formats)) export const isURLValid = (url: string) => { try {