mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 09:35:56 -05:00
15 lines
316 B
JavaScript
15 lines
316 B
JavaScript
|
var bunyan = require('bunyan');
|
||
|
|
||
|
module.exports = function () {
|
||
|
var logger = bunyan.createLogger({
|
||
|
name: 'www',
|
||
|
serializers: {req: bunyan.stdSerializers.req}
|
||
|
});
|
||
|
|
||
|
return function (req, res, next) {
|
||
|
req.log = logger;
|
||
|
req.log.info({req: req});
|
||
|
next();
|
||
|
};
|
||
|
};
|