I\'m trying to use Morgan with Express.js to write a log file while showing my logs on the console as well. I\'m using this code:
var logger = require(\'morgan\'
From github
var logger = require('morgan'); app.use(logger('common', { stream: fs.createWriteStream('./access.log', {flags: 'a'}) })); app.use(logger('dev'));