podman icon indicating copy to clipboard operation
podman copied to clipboard

Ensure log level is applied before loading configuration

Open mdiniz97 opened this issue 4 months ago • 1 comments

Podman loads its configuration during global initialization, before the --log-level option is processed. As a result, debug and trace messages emitted while reading configuration files are suppressed, making invalid or unknown configuration keys difficult to diagnose.

This change applies the requested log level before configuration initialization, ensuring that configuration-loading diagnostics are visible when commands are executed with --log-level=debug or --log-level=trace.

Fixes: #25362

Checklist

  • [x] Certify you wrote the patch or otherwise have the right to pass it on as an open-source patch by signing all commits (git commit -s).
  • [x] Referenced issues using Fixes: #00000 in commit message.
  • [x] Tests have been added/updated.
  • [x] Documentation has been updated or no documentation changes are needed.
  • [x] All commits pass make validatepr (format/lint checks).
  • [x] Release note entered below.

Does this PR introduce a user-facing change?

Configuration parsing diagnostics are now displayed when Podman is started with an appropriate debug or trace log level.

mdiniz97 avatar Jul 23 '26 02:07 mdiniz97

[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore.

Fixed and squashed in 569b49e9b3.

mdiniz97 avatar Aug 10 '26 18:08 mdiniz97

squashed in https://github.com/podman-container-tools/podman/commit/18e1154e73f942247b1e7c258036368651b62216.

mdiniz97 avatar Aug 13 '26 12:08 mdiniz97

I do not have time to check tests right now, but the code looks good otherwise I think. LGTM.

jankaluza avatar Aug 13 '26 12:08 jankaluza