You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note how the compressed file has "-rw-r--r--" file permisions, and not "-rw-------" as expected. Thus, "mode" config is apparently ignored when "compress" is "true" in the log4js config. (If I set "compress" to "false" then the backup file has the expected "-rw-------" file permissions).
I am using log4js version 6.3.0 (the newest one).
The text was updated successfully, but these errors were encountered:
Log file r/w permissions (configured via "mode") are not set correctly when "compress" is set to "true".
How to reproduce:
$ node index.js
and then
$ ls -l
to get
-rw------- 1 morten morten 54 Sep 3 14:23 my-logger.log
Note the "-rw-------" part, which means read/write only for me ("morten"). That matches my mode config in the code, so all good.
$ touch -d "24 hours ago" my-logger.log
to change the file date back 24 hours (to force compression in step 4 below).
and then
$ ls -l
to get
-rw------- 1 morten morten 54 Sep 2 14:26 my-logger.log
Note that "Sep 3" changed to "Sep 2" as expected so all good.
$ node index.js
and then
$ ls -l
to get
Note how the compressed file has "-rw-r--r--" file permisions, and not "-rw-------" as expected. Thus, "mode" config is apparently ignored when "compress" is "true" in the log4js config. (If I set "compress" to "false" then the backup file has the expected "-rw-------" file permissions).
I am using log4js version 6.3.0 (the newest one).
The text was updated successfully, but these errors were encountered: