2018-03-29 21:21:23 +02:00
|
|
|
const logger = require('winston');
|
|
|
|
|
|
|
|
const requestLogger = (req, res, next) => { // custom logging middleware to log all incoming http requests
|
2018-04-09 01:54:09 +02:00
|
|
|
logger.debug(`Request on ${req.originalUrl} from ${req.ip}`);
|
2018-03-29 21:21:23 +02:00
|
|
|
next();
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = requestLogger;
|