containers / skopeo

Work with remote images registries - retrieving information, images, signing content
Apache License 2.0
8.03k stars 766 forks source link

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

Closed juur closed 9 months ago

juur commented 1 year ago

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:

mtrmac commented 1 year ago

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[bot] commented 1 year ago

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