Add rotating log files #280

Merged
Vylpes merged 2 commits from feature/247-rotating-logs into develop 2024-06-29 18:28:28 +01:00
Showing only changes of commit b94b49a416 - Show all commits

View file

@ -29,11 +29,11 @@ export default class AppLogger {
const logDir = path.join(process.env.DATA_DIR, "logs"); const logDir = path.join(process.env.DATA_DIR, "logs");
logger.add(new DailyRotateFile({ logger.add(new DailyRotateFile({
filename: 'bot-%DATE%.log', filename: "bot-%DATE%.log",
dirname: logDir, dirname: logDir,
datePattern: 'YYYY-MM-DD-HH', datePattern: "YYYY-MM-DD-HH",
maxSize: '20m', maxSize: "20m",
maxFiles: '14d', maxFiles: "14d",
})); }));
} }