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

Output: use logging, remove verbose output by default #741

Merged
merged 2 commits into from
Mar 9, 2024

Conversation

maurerle
Copy link
Contributor

@maurerle maurerle commented Aug 7, 2023

Fixes #489.

Introduces a --verbose flag if you want to see all the noise that was previously printed by default.

@maurerle
Copy link
Contributor Author

maurerle commented Aug 8, 2023

I made the linter happy, so this can be merged

@maurerle
Copy link
Contributor Author

@muayyad-alsadi can I do anything to help getting this merged?

@crdoconnor
Copy link

This would be extremely useful.

@errodrigues
Copy link

+1
Any plans to include this in the next tag/release? Would be a game changer for QoL!

@nethad
Copy link

nethad commented Sep 20, 2023

@maurerle Maybe remove the word "garbage" and rename it to "verbose"? 😅 I really hope this gets merged soon.

@maurerle maurerle changed the title Output: use logging, remove garbage output by default Output: use logging, remove verbose output by default Sep 20, 2023
@nassir90
Copy link

I too hope this can be merged soon. It's a pretty minor code change for a massive QoL improvement.

@ParetoOptimalDev
Copy link

Just starting to evaluate migrating to podman from docker. It's a little alarming that there is not yet a way to lower the noticeably much more verbose output, but I'll keep evaluating it.

@maurerle
Copy link
Contributor Author

maurerle commented Dec 7, 2023

Hi @ParetoOptimalDev,
i think there is also the possibility to use docker-compose with podman - instead of the unmaintained podman-compose version.
See here:
https://docs.podman.io/en/latest/markdown/podman-compose.1.html

Other than that you can try my fork of podman-compose which has merged a lot of the missing features which are available in open pull requests here:
https://github.com/maurerle/podman-compose

@thiagolsfortunato
Copy link

any news? 👀

@crdoconnor
Copy link

crdoconnor commented Jan 24, 2024 via email

@@ -394,7 +392,7 @@ def assert_volume(compose, mount_dict):
proj_name = compose.project_name
vol_name = vol["name"]
is_ext = vol.get("external", None)
log(f"podman volume inspect {vol_name} || podman volume create {vol_name}")
log.debug("podman volume inspect %s || podman volume create %s", vol_name, vol_name)
Copy link
Collaborator

@p12tic p12tic Mar 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to keep f-string str.format formatting here? I understand that debug function would still need to parse it internally. It feels inconsistent to see {} in some places and then % in others.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your review!
There is no better approach to this as I know.
It is best practice to lazy eval in logging (which is currently only supported with % placeholders) but it is efficient to use f-strings everywhere else.

Copy link
Collaborator

@p12tic p12tic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you!

The PR will need a rebase to latest main branch.

@p12tic
Copy link
Collaborator

p12tic commented Mar 8, 2024

cc @maurerle or anyone else who's interested. This PR could easily land if someone rebased it.

jamesob and others added 2 commits March 9, 2024 10:36
Fixes containers#489.

Introduces a --verbose flag if you want to see all the noise that
was previously printed by default.

Signed-off-by: James O'Beirne <[email protected]>
Signed-off-by: Florian Maurer <[email protected]>
* fix black and pylint issues

Signed-off-by: Florian Maurer <[email protected]>
@maurerle
Copy link
Contributor Author

maurerle commented Mar 9, 2024

Thanks @p12tic ! hopefully this will get merged finally :)

@p12tic p12tic merged commit 60137eb into containers:main Mar 9, 2024
4 checks passed
@p12tic
Copy link
Collaborator

p12tic commented Mar 9, 2024

We may need to re-add part of logging that prepended task name to log output. However this is useful only to podman-compose developers. There are many more users who will find their output much cleaner now. So it makes sense to postpone further improvements and merge what we have.

@maurerle maurerle deleted the quiet-output branch March 9, 2024 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lower verbosity by default or add option to allow removing prefixed and suffixed debug output
9 participants