fediblock-instance/lib/logger.js
ale e0fae7a6b4
All checks were successful
continuous-integration/drone/tag Build is passing
initial commit
2024-09-15 19:44:53 +02:00

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)
}