improve request logging

This commit is contained in:
zadam
2020-07-02 23:15:37 +02:00
parent 18749092ff
commit dee4083bf3
3 changed files with 6 additions and 16 deletions

View File

@@ -111,11 +111,7 @@ function route(method, path, middleware, routeHandler, resultHandler, transactio
res.sendStatus(500);
}
const time = Date.now() - start;
if (time >= 10) {
console.log(`Slow request: ${time}ms - ${method} ${path}`);
}
log.request(req, Date.now() - start);
});
}