openshift / ocm-container

Containerized environment for accessing OpenShift v4 clusters, packing necessary tools/scripts
Apache License 2.0
10 stars 63 forks source link

Suppress unnecessary output at normal log levels #303

Open clcollins opened 2 weeks ago

clcollins commented 2 weeks ago

Suppress unnecessary output at normal log levels

As an SRE I would like non-debug output suppressed when running OCM Contianer.

Currently, it prints the container engine image pull output to the screen. This is messy and not compliant with the "no news is good news" Unix/Linux terminal/cli philosophy.

This PR has a case switch for log levels > debug, appending the --quiet flag to the Podman/Docker create command, which will suppress the output for any higher log levels.

OCM Container also prints the config file used for Viper argument parsing.

This PR also removes that config file parsing ouput, unless there is an error, since location is standardized and documented.

Secondary commit unrelated to this main PR includes a minor spelling fix to the CLI flags help message.

Signed-off-by: Chris Collins collins.christopher@gmail.com

dem4gus commented 2 weeks ago

/lgtm

openshift-ci[bot] commented 2 weeks ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: clcollins, dem4gus

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/openshift/ocm-container/blob/master/OWNERS)~~ [clcollins] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
clcollins commented 2 weeks ago

/retest