[go: up one dir, main page]

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

Errors printed to stdout instead of stderr #33

Closed
strk opened this issue Oct 25, 2017 · 3 comments · Fixed by #34
Closed

Errors printed to stdout instead of stderr #33

strk opened this issue Oct 25, 2017 · 3 comments · Fixed by #34
Assignees
Labels
Milestone

Comments

@strk
Copy link
Contributor
strk commented Oct 25, 2017

Errors, even if fatal, are printed to standard output instead of standard error (or log) stream.
What I'm after, in particular, is a call with -c parameter pointing to unexistent configuration file.
All messages, I see in code, are sent to a so-called meta filedescriptor.
Such meta filedescriptor is initially set to stdout and can be further by passing a second parameter to the command invocation, wereas it becomes the "log file".

So, until all command lines are processed, and unless a log file is specified, errors are printed to stdout, being the "default log stream".

I'm not sure how to best handle this, but when using standard output for the actual destination of the copy (see #31) finding errors in that stream gets in the way...

@strk
Copy link
Contributor Author
strk commented Oct 25, 2017

@palmerj do you think it would be a problem to change the default message stream from stdout to stderr ?

@strk
Copy link
Contributor Author
strk commented Oct 25, 2017

With #34 I've made all messages go to stderr until the "logfile" argument is considered. At that point, after successfully opening the logfile, all messages to to logfile. This also keeps the current default logfile being "stdout" as all messages will go to stdout after checking no different logfile was requested.

@palmerj
Copy link
Contributor
palmerj commented Oct 25, 2017

@palmerj do you think it would be a problem to change the default message stream from stdout to stderr ?

Yes that's a good move.

@strk strk closed this as completed in #34 Nov 2, 2017
strk added a commit that referenced this issue Nov 2, 2017
…34)

Somehow fixes #33

Include motivation for inability to open config file or metadata file
Include test for a specific error (not found configuration file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants