Lower verbosity by default or add option to allow removing prefixed and suffixed debug output
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.
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.
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.
@cthu1hoo for what it's worth, this patch makes things somewhat more bearable: https://github.com/containers/podman-compose/pull/557
The console output is too verbose and really annoying. Would be really nice if someone could take a look at @cthu1hoo 's patch #557
Like to push it too
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: