#89: Adding timestamps to server logs

This commit is contained in:
Eric Herbrandson
2020-05-08 15:05:58 -05:00
parent 0f274e7a37
commit 41763b994a

View File

@@ -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();
}