podman-compose icon indicating copy to clipboard operation
podman-compose copied to clipboard

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

Open NoTuxNoBux opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe. podman-compose prints additional debug information when commands are executed, and there appears to be no way to silence it. Some tools process CLI output as-is and expect it to be in a certain format (such as JSON), but the additional output printed by podman-compose before the actual command output can break these tools.

Describe the solution you'd like Perhaps lower the default verbosity to not print debug output unless -v or --verbose is passed.

Describe alternatives you've considered Leaving the current behaviour the same, and adding a flag --silent, --verbosity=none or similar, to achieve the same effect.

Additional context The version I'm using is 1.0.3.

Below is an example of the problem. Suppose I have some tool that wants to execute echo hi, and I want to wrap this in a container using Podman, I override the command to be:

podman exec --interactive --tty some_container_1 echo hi

The output is:

hi

Great, that works. Now I want to use podman-compose to do the same, and execute the command from an existing container in my pod, so I turn this into:

podman-compose exec some_container echo "hi"

The output is now the expected output, prefixed and suffixed with debug information:

['podman', '--version', '']
using podman version: 4.0.3
podman exec --interactive --tty some_container_1 echo hi
hi
exit code: 0

This debug information is useful, but is usually redundant in scenarios such as podman-compose up (and also seems to expose secrets if you pass them through the environment, as it also logs the environment variables it passes), so the best approach seems to lower the verbosity by default.

NoTuxNoBux avatar May 02 '22 13:05 NoTuxNoBux

I'd like to bump this because the sheer amount of impossible-to-disable debugging output podman-compose generates on every command invocation makes it hard to figure out the useful parts of my container logging output which is entirely drowned out by information that is of no practical use to me whatsoever.

At this point I'm thinking of switching back to docker and docker-compose because this issue is affecting my workflow on a noticeable enough level.

cthu1hoo avatar Jun 10 '22 14:06 cthu1hoo

Could be possible to take this issue with a little more importance? I find this issue really annoying for my workflow, and at this point It forced me to have installed docker and and docker compose just to avoid this issue.

C-512L avatar Jul 22 '22 00:07 C-512L

@cthu1hoo for what it's worth, this patch makes things somewhat more bearable: https://github.com/containers/podman-compose/pull/557

jamesob avatar Sep 19 '22 19:09 jamesob

The console output is too verbose and really annoying. Would be really nice if someone could take a look at @cthu1hoo 's patch #557

errodrigues avatar Apr 20 '23 21:04 errodrigues

Like to push it too

feelancer21 avatar Apr 28 '23 17:04 feelancer21

Looks like it's about to be merged via https://github.com/containers/podman-compose/pull/741 (superseded https://github.com/containers/podman-compose/pull/557 as per https://github.com/containers/podman-compose/pull/557#issuecomment-1668395337) :partying_face:

PierreBeucher avatar Aug 18 '23 13:08 PierreBeucher