mirror of
https://github.com/skooner-k8s/skooner.git
synced 2026-02-14 17:49:55 +00:00
#89: Adding timestamps to server logs
This commit is contained in:
@@ -70,7 +70,7 @@ function preAuth(req, res, next) {
|
||||
}
|
||||
|
||||
function logging(req, res, next) {
|
||||
res.once('finish', () => console.log(req.method, req.url, res.statusCode));
|
||||
res.once('finish', () => console.log(new Date(), req.method, req.url, res.statusCode));
|
||||
next();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user