caddy
caddy copied to clipboard
logging: Allow setting log file permissions
Adding a "mode" option to overwrite the default logfile permissions. Default remains "0600" which is the one currently used by lumberjack.
Fixes #6295
I am assuming that Mode = 0 triggers usage of default mode "0600". That implies that users cannot use a "0000" mode for their log files. This sounds reasonable to me, but your opinion here would be appreciated.
I did not test the PR in production. I only tested in local and all went fine. Beware that your umask may interfere with the mode from the config: this is why umask is unset in the tests.
This is my first PR here. I would appreciate great care in the code review, I am fully open to your comments of course.
Cheers.