Skip to content
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

All messages are output to stderr #7

Open
teeuwen opened this issue Jan 12, 2021 · 3 comments · May be fixed by #17
Open

All messages are output to stderr #7

teeuwen opened this issue Jan 12, 2021 · 3 comments · May be fixed by #17

Comments

@teeuwen
Copy link

teeuwen commented Jan 12, 2021

I noticed all messages, regardless of their importance are redirected to stderr.

This bother me because I've set up a cronjob for apk-autoupdate to run every day like so:

[email protected]
0       2       *       *       *       /usr/sbin/apk-autoupdate > /dev/null

I would expect "Checking available updates..." to be redirected to /dev/null accordingly. Right now, I get an email every day telling me that apk-autoupdate is checking for available updates.

fossdd added a commit to fossdd/apk-autoupdate that referenced this issue Aug 15, 2024
@fossdd fossdd linked a pull request Aug 15, 2024 that will close this issue
@Eeems
Copy link

Eeems commented Aug 15, 2024

Instead of piping to /dev/null, you could use chronic to only output on failure: https://manpages.ubuntu.com/manpages/trusty/man1/chronic.1.html

@fossdd
Copy link

fossdd commented Aug 15, 2024

This is also a good idea. Nevertheless I opened #17 which should output INFO messages like Checking available updates... to stdout.

@fossdd
Copy link

fossdd commented Oct 3, 2024

Hmm, after thinking about it. I'm not sure if outputting INFO to stdout makes sense. Often all diagnostic output is written to stderr, including info messages. Maybe a info level variable would make here more sense?

@jirutka what do you think about it?

fossdd added a commit to fossdd/apk-autoupdate that referenced this issue Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants