fediblock-instance/lib/logger.js

8 lines
306 B
JavaScript
Raw Permalink Normal View History

2024-09-15 17:44:53 +00:00
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)
}