From 37692bccd7217e3c99b772c2df8ab1d54a41600d Mon Sep 17 00:00:00 2001 From: Nourman Hajar Date: Thu, 29 Aug 2024 22:27:35 +0700 Subject: [PATCH] fix: add timestamp into log (#2) --- apps/ziyo-be/src/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/ziyo-be/src/index.ts b/apps/ziyo-be/src/index.ts index d7cc3a1..1c5f85e 100644 --- a/apps/ziyo-be/src/index.ts +++ b/apps/ziyo-be/src/index.ts @@ -40,7 +40,11 @@ const app = new Hono() .use('*', cors()) .use( '*', - logger((str) => console.log(decodeURIComponent(str))), + logger((str) => + console.log( + `${decodeURIComponent(str)} on ${new Date().toLocaleString('sv-SE').replace(' ', 'T').split('.')[0]}`, + ), + ), ) .use('*', compress()) .get('*', async (c, next) => {