From d867b4d31be01f3114c3417c4114a3896cfe096c Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 9 Apr 2024 11:53:27 +0200 Subject: Use log methods instead of console --- src/app.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/app.ts') diff --git a/src/app.ts b/src/app.ts index 317b9c0..6cc6520 100644 --- a/src/app.ts +++ b/src/app.ts @@ -65,7 +65,7 @@ function registerFile( pathname = "/" + (pathname === "." || pathname === "./" ? "" : pathname); if (files.get(pathname) !== undefined) { - console.warn("File already registered:", pathname); + log.warn("File already registered:", pathname); } const handle = Bun.file(filename); files.set(pathname, { @@ -280,13 +280,13 @@ export const server = { content_encoding: "identity", }); Sentry.captureException(error); - console.error("Error", error); + log.error("Error", error); return new Response("Something went wrong", { status: status }); } finally { const seconds = endTimer(); metrics.requestDuration.observe(seconds); transaction.finish(); - console.info( + log.info( request.method, status, hostname, -- cgit 1.4.1