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

INFO logs printed to the stderr #156

Closed
baruchiro opened this issue Aug 1, 2023 · 2 comments · Fixed by #166
Closed

INFO logs printed to the stderr #156

baruchiro opened this issue Aug 1, 2023 · 2 comments · Fixed by #166
Assignees
Labels
bug Something isn't working good first issue Good for newcomers internal requirement Requirements from Checkmarx internally

Comments

@baruchiro
Copy link
Contributor

The INFO level logs are printed to the stderr right now.

It is not right, because there is a common practice of running a CLI thought code, and following the stderr for errors.

Where should we print the INFO logs?

If we take the Docker execution, the easiest way to get the results from a Docker is by printing the Docker log into a file. With this practice, we will get the log inside our results file, which is not good.
On the other hand, the stdout of Docker is used for logs, and we need to track the logs.

So we can print to the stdout and force the Docker user to mount a volume and read the results file, or we can add a --quite flag to not log to the stdout.

@baruchiro baruchiro added bug Something isn't working internal requirement Requirements from Checkmarx internally labels Aug 1, 2023
@jossef
Copy link
Member

jossef commented Aug 3, 2023

error -> stderr
info -> stdout
debug -> stdout

  • add --quiet flag to not print any logs to the stdout at all (if someone parses the output straight from stdout)

@baruchiro baruchiro added the good first issue Good for newcomers label Aug 4, 2023
@baruchiro baruchiro added this to 2ms Aug 7, 2023
@baruchiro baruchiro self-assigned this Aug 7, 2023
@baruchiro
Copy link
Contributor Author

Example:
rs/zerolog#150 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers internal requirement Requirements from Checkmarx internally
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants