-
Notifications
You must be signed in to change notification settings - Fork 768
dateFile appender "mode" not working #1394
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
Comments
Can I have more information?
Also, how about the |
Log4js: 6.9.1
|
Hi, based on your code, which uses If you want Also, if the file is an existing file, it will retain the existing permissions and permissions specified in the You might also want to check the const log4js = require('log4js');
const BACKUP_VAL = 3;
const MAXSIZE_VAL = 1048576;
const CONFIG = {
appenders: {
out: { type: 'console' },
info: {
type: 'dateFile',
filename: 'logs/info.txt',
alwaysIncludePattern: true,
keepFileExt: true,
numBackups: BACKUP_VAL,
maxLogSize: MAXSIZE_VAL,
mode: 0o600
},
default: {
type: 'dateFile',
filename: 'logs/default.txt',
alwaysIncludePattern: true,
keepFileExt: true,
numBackups: BACKUP_VAL,
maxLogSize: MAXSIZE_VAL,
mode: 0o644
}
},
categories: {
info: { appenders: ['info'], level: 'info' },
default: { appenders: ['out', 'default'], level: 'info' },
}
};
log4js.configure(CONFIG);
const loginfo = log4js.getLogger("info");
const logothers = log4js.getLogger("others");
loginfo.info("test");
logothers.info("test"); info.txt is 0o600 or 384 or -rw-------
default.txt is 0o644 or 420 or -rw-r--r-- |
@sshhawwnn, any updates? |
Tried with both
mode: 384
ormode: 0o644
, none is working.The text was updated successfully, but these errors were encountered: