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");
|
||||
|
||||
logger.add(new DailyRotateFile({
|
||||
filename: 'bot-%DATE%.log',
|
||||
filename: "bot-%DATE%.log",
|
||||
dirname: logDir,
|
||||
datePattern: 'YYYY-MM-DD-HH',
|
||||
maxSize: '20m',
|
||||
maxFiles: '14d',
|
||||
datePattern: "YYYY-MM-DD-HH",
|
||||
maxSize: "20m",
|
||||
maxFiles: "14d",
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue