-
Notifications
You must be signed in to change notification settings - Fork 90
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
Bacalhau Client commands should log at Error level by default #4342
Comments
The output flag on the command wasn't ignored, the returned content is json and is written to stdout. The first line:
Is a log message, written to stderr.
The rest of the output comes from the command, and is written to stdout as json. |
We should NEVER EVER write logs to stderr unless they are errors. That is an "INFO". Also, when not logging in interactively, this is indisguishable. E.g.:
This logs in via golang, and is indistinguishable as stdout vs. stderr |
Understood, will re-purpose this issue to change the default logging level for client commands to log at the Error level only.
Assumedly, this is go code that is shelling out to a bacalhau binary installed on the host? If that is the case it might be worth using https://pkg.go.dev/os/exec#Cmd.StderrPipe and https://pkg.go.dev/os/exec#Cmd.StdoutPipe to differentiate errors from the app vs. output of the bacalhau command being executed. |
no, it's an external app that is shelling into the remote machine - the only thing we have available there is the bacalhau binary (no code deployed). |
This was fixed in #4588 and released with v1.5.0, and now will look like:
|
immediately after installing on a new machine
Notice the first line - even thought it was supposed to be in "json"
The text was updated successfully, but these errors were encountered: