all repos — homestead @ 5fdfe4ed42e95ab411e714ac0d104b5806cae5d0

Code for my website

Use log methods instead of console

Alan Pearce
commit

5fdfe4ed42e95ab411e714ac0d104b5806cae5d0

parent

84704708540d1b1abef1a8017a638ab5ec26aec8

1 file changed, 3 insertions(+), 3 deletions(-)

changed files
M src/app.tssrc/app.ts
@@ -65,7 +65,7 @@ ): void {
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 @@ status_code: status,
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,