mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-12-24 06:22:28 -05:00
14 lines
320 B
JavaScript
14 lines
320 B
JavaScript
const bunyan = require('bunyan');
|
|
|
|
module.exports = function () {
|
|
const logger = bunyan.createLogger({
|
|
name: 'www',
|
|
serializers: {req: bunyan.stdSerializers.req}
|
|
});
|
|
|
|
return function (req, res, next) {
|
|
req.log = logger;
|
|
req.log.info({req: req});
|
|
next();
|
|
};
|
|
};
|