Add rotating log files #280
1 changed files with 4 additions and 4 deletions
|
@ -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",
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue