Skip to content

Commit

Permalink
fix: add timestamp into log (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
masnormen authored Aug 29, 2024
1 parent ba8cbe8 commit 37692bc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/ziyo-be/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 37692bc

Please sign in to comment.