-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Normal tarsnapper output goes to stderr instead of stdout #26
Comments
The Python log library is used, and this is it's default behaviour, because I believe the standard assumption is indeed that messages (error or otherwise) go to stderr, whereas stdout is for data. This way, when you do Of course, tarsnapper does not have any actual "data". Still, I would lean towards a "log level" option instead, where for running in cron you could simply disable messages that aren't errors. |
Well I think either
I think it would just add unnecessary complexity to implement number 2 (more parameters), because stdout and stderr are already easy to work with and why not use stdout for non-error messages when it's not used for anything else? |
A --quiet flag is pretty simple to do, and I have a preference for it, since it is pretty standard. Having said that, maybe it deserves reconsidering what "standard" output is vs what is a log message. Anyway, I don't want to overthink this. If you want to submit a pull request I'm fine with either. |
When I run
I get output like
I would like to suppress normal output like this (which should be stdout) when I run tarsnapper using cron so that I only get email from cron when there is an error (something output to stderr)
So I tried:
But I still get the same output! I figured only when I redirect using
2>/dev/null
I get rid of this output so tarsnapper seems to output this normal output to stderr which is a bug in my opinion. Only errors should be output to stderr and everything else to stdout.I'm running on Ubuntu 15.04 using tarsnapper installed with
easy_install
.The text was updated successfully, but these errors were encountered: