scratch-www/dev-server/log.js
Ray Schamp 43788eb7d8 Split server and routes/config
Turn HtmlGeneratorPlugin into a module
Turn server into dev-server and simplify it
2016-04-18 14:07:11 -04:00

14 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();
};
};