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

Use of logrus causes incorrect use of stdout and stderr #1812

Closed
juur opened this issue Nov 19, 2022 · 2 comments
Closed

Use of logrus causes incorrect use of stdout and stderr #1812

juur opened this issue Nov 19, 2022 · 2 comments
Labels
kind/feature A request for, or a PR adding, new functionality locked - please file new issue/PR stale-issue

Comments

@juur
Copy link

juur commented Nov 19, 2022

Logrus appears to have an unresolved (and because logrus is in maintenance mode, will never be resolved) standard way of handling different logging levels going to stdout vs. stderr. As there is also no-way to set the log level and/or engage silent mode, this makes it hard to have fairly-silent scripts that only output on error.

It's not correct behaviour to redirect stdout to /dev/null and get INFO messages printed, really.

There are a few suggestions I can think of:

  • Have two different loggers, one for stdout and one for stderr, and use the correct.
  • Switch to a different Go logging framework that solves this problem
  • Introduce a --log-level option and/or a --silent option to set the logging level to WARN
@mtrmac
Copy link
Collaborator

mtrmac commented Nov 21, 2022

Thanks for the report.

A fairly large stack of dependencies uses logrus; so switching a framework wouldn’t be a simple Skopeo change. It’s an option, in principle, but it’s a fairly hard sell — to my knowledge we don’t have a large set of issues that would motivate such a large-scale work.

For the same reason, having two different loggers isn‘t really possible.

The --log-level option has a precedent in Podman, so that seems the easiest way to handle this.

@github-actions
Copy link

github-actions bot commented Jan 7, 2023

A friendly reminder that this issue had no activity for 30 days.

@juur juur closed this as not planned Won't fix, can't repro, duplicate, stale Nov 11, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature A request for, or a PR adding, new functionality locked - please file new issue/PR stale-issue
Projects
None yet
Development

No branches or pull requests

2 participants