From 562678217842701d59e6ca5b8a95b7c98f092192 Mon Sep 17 00:00:00 2001 From: HorizonCode Date: Fri, 12 May 2023 12:55:31 +0200 Subject: [PATCH] do log after request is done --- example/test.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/example/test.ts b/example/test.ts index fd629b0..8dad9a1 100644 --- a/example/test.ts +++ b/example/test.ts @@ -22,9 +22,8 @@ httpServer.preprocessor((_req, rep) => { }); httpServer.middleware(async (req, _rep, done) => { - console.log(`${req.method} - ${req.remoteIpAddr} - ${req.path}`); const processTime = await done(); - console.log(`Processed in ${prettyTime(processTime)}`); + console.log(`${req.method} - ${req.remoteIpAddr} - ${req.path} - ${prettyTime(processTime)}`); }); httpServer.error((req, _rep) => {