Ensure log level is applied before loading configuration
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: #00000in 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.
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore.
Fixed and squashed in 569b49e9b3.
squashed in https://github.com/podman-container-tools/podman/commit/18e1154e73f942247b1e7c258036368651b62216.
I do not have time to check tests right now, but the code looks good otherwise I think. LGTM.