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

terminus wp: Send “Running wp…” to STDERR #281

Closed

Conversation

westonruter
Copy link
Contributor

The informational (verbose) message about what command is running gets in the way of scripts capturing the output. For instance:

version=$(terminus wp core version --site=example)
echo $version
# => Running wp core version on example-dev 4.2.2

The informational message should be sent to STDERR instead.

As an aside, the Terminus\Loggers\Regular class should expose a public method for writing to STDERR.

@bensheldon
Copy link
Contributor

Thanks for trying to solve this issue. Unfortunately, I think that piping output to STDERR is not the best solution because the output is debug/verbose in nature, rather than an error.

I think a better solution is would be to not output anything by default, and instead offer a --debug flag. Do you think you would be able to implement that alternatively?

@westonruter
Copy link
Contributor Author

Output to STDERR doesn't imply that it is necessarily an error: https://en.wikipedia.org/wiki/Standard_streams#Standard_error_.28stderr.29

So the output to STDERR can be diagnostics, or additional verbose messages. For instance, if you invoke curl with verbose output, all of the additional information that isn't output from the HTTP response is sent to STDERR.

@bensheldon
Copy link
Contributor

I think the best course of action would be to provide a log-level within the Terminus::line function, and then we can send that to the appropriate buffer (or not output it all).

@ronan
Copy link
Contributor

ronan commented Sep 17, 2015

This has been fixed by the new logger (#477) and the new way of dealing with output (#485)

@ronan ronan closed this Sep 17, 2015
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 this pull request may close these issues.

None yet

3 participants