mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
13 lines
283 B
JavaScript
13 lines
283 B
JavaScript
|
'use strict';
|
||
|
|
||
|
const logger = require('../logger')('HTTP');
|
||
|
|
||
|
module.exports = function(config) {
|
||
|
return (req, res, next) => {
|
||
|
next();
|
||
|
if (config.enableRequestLogger) {
|
||
|
logger.info(`${res.statusCode} ${req.method} ${req.baseUrl}`);
|
||
|
}
|
||
|
};
|
||
|
};
|