Added log colors and method name

This commit is contained in:
Ajay Ramachandran
2020-08-23 12:35:57 -04:00
parent 9cebb8769f
commit ece475076e
2 changed files with 34 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
const log = require('../utils/logger.js'); // log not logger to not interfere with function name
module.exports = function logger (req, res, next) {
log.info('Request recieved: ' + req.url);
log.info("Request recieved: " + req.method + " " + req.url);
next();
}