diff options
Diffstat (limited to 'hooks/mod.ts')
-rwxr-xr-x | hooks/mod.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hooks/mod.ts b/hooks/mod.ts index 8771bea..f858ad0 100755 --- a/hooks/mod.ts +++ b/hooks/mod.ts @@ -9,10 +9,11 @@ import { const getRequestLogger = (req: Request) => { const url = new URL(req.url); + const traceId = crypto.randomUUID(); const getPrefix = () => `[${ new Date().toISOString() - }] RequestTrace=[${crypto.randomUUID()}] @ [${url.pathname}] -X [${req.method}] |`; + }] RequestTrace=[${traceId}] @ [${url.pathname}] -X [${req.method}] |`; return loggerWithPrefix(getPrefix); }; |