New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dateFile Appender daysToKeep not rolling by days #1035
dateFile Appender daysToKeep not rolling by days #1035
Comments
I also found this issue, do you have some new progress? |
Related to #1080. |
已收到,谢谢
|
I want to split it both by day and by size, and I should |
Yes, you can. And it is either through file Appender or dateFile Appender.
const log4js = require("log4js");
log4js.configure({
appenders: {
everything: {
type: "file",
filename: "testFile.log",
pattern: "yyyy-MM-dd-hh", // settings from dateFile appender
maxLogSize: 20
},
},
categories: {
default: { appenders: ["everything"], level: "debug" },
},
});
const logger = log4js.getLogger();
logger.debug("hello world");
const log4js = require("log4js");
log4js.configure({
appenders: {
everything: {
type: "dateFile",
filename: "testDateFile.log",
pattern: "yyyy-MM-dd-hh",
maxLogSize: 20 // settings from file Appender
},
},
categories: {
default: { appenders: ["everything"], level: "debug" },
},
});
var logger = log4js.getLogger();
logger.debug("hello world"); |
@LmonZero Does it resolve for you? |
yes |
when the pattern is not
.yyyy-MM-dd
, the daysToKeep not work as doc says.for example. when pattern is
.yyyy-MM-dd-hh-mm
, the daysToKeep is not control the old log Rolling by days, just keep the logs backups not more than daysToKeep.log files
The text was updated successfully, but these errors were encountered: