8 lines
306 B
JavaScript
8 lines
306 B
JavaScript
|
module.exports = app => {
|
||
|
const morgan = require('morgan'),
|
||
|
rfs = require('rotating-file-stream'),
|
||
|
accessLogStream = rfs.createStream('access.log', { interval: '1d', path: __dirname + '/../logs' }),
|
||
|
logger = morgan('combined', { stream: accessLogStream })
|
||
|
app.use(logger)
|
||
|
}
|