-
Notifications
You must be signed in to change notification settings - Fork 80
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
Add support for simple log outputs as alternative to email #147
Conversation
Looks good except one thing. I'd call the variable simply NO_MAIL_OUTPUT. |
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Final nits
Just to be clear, since some of the annotations refer to code that was not written by me: do you want me to reformat the whole anacron project for consistency? I find the style questionable, but intentionally decided against touching it and left it as-is. This concerns indentation, curly braces and new lines. |
No, do not reformat please. Just change the lines I've commented about. |
Merged. Thank you for your contribution. |
This PR adds support for a new environment variable
INHERIT_OUTPUTS
which, when set, indicates that the outputs (stdout and stderr) of a job should not be sent by mail and instead just be written to stdout/stderr as usual. The value of this feature is that it allows for a more uniform logging approach without a mail server set up.For example, on my system,
anacron
is run bycronie
every hour (as is the default). The outputs of cronie and anacron are logged injournalctl
. It would be nice to have the logs of my anacron jobs there as well, which can be achieved by leaving stdout and stderr of the job processes as-is.This PR's motivation is similar to that of #135 but completely ignores the mail functionality.