do log after request is done
This commit is contained in:
parent
e3e5f8c1d2
commit
5626782178
|
@ -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) => {
|
||||
|
|
Reference in New Issue
Block a user