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

Logging: handle verbosity as a ResourceOption #12

Merged
merged 3 commits into from
Oct 2, 2024
Merged

Conversation

Yannick-Dayer
Copy link
Collaborator

@Yannick-Dayer Yannick-Dayer commented Oct 2, 2024

When verbosity_option is a ResourceOption (to make the verbosity settable by a config), the logging level will not be set for the logs in the config files (the level of the rest of the app is fine).
Otherwise, when verbosity_option is a "simple" option, the verbosity will be set correctly during the loading of the config files.

Fixes #11.


📚 Documentation preview 📚: https://clapper--12.org.readthedocs.build/en/12/

When `verbosity_option` is a `ResourceOption` (to make the verbosity settable by
a config), the logging level will not be set for the logs in the config files.
Copy link

github-actions bot commented Oct 2, 2024

Coverage report

This PR does not seem to contain any modification to coverable code.

Ensure the log level is set in config files when `verbosity_option` is
not a `ResourceOption`.
Ensure the log level is still correctly imported from the config when
`verbosity_option` is a `ResourceOption`.
@Yannick-Dayer Yannick-Dayer force-pushed the fix/verbosity-as-config branch from 97453aa to a6093ce Compare October 2, 2024 15:37
Add information on the behavior of the `verbosity_option` when it is set
as `ResourceOption`.
Fix a typos in an help message (propagating the change in the tests).
@Yannick-Dayer Yannick-Dayer marked this pull request as ready for review October 2, 2024 16:59
@Yannick-Dayer Yannick-Dayer requested a review from anjos October 2, 2024 17:00
Copy link
Member

@anjos anjos left a comment

Choose a reason for hiding this comment

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

Great job!

@anjos anjos merged commit b61b93a into main Oct 2, 2024
10 checks passed
@anjos anjos deleted the fix/verbosity-as-config branch October 2, 2024 17:14
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.

Verbosity as Resource Option triggers an error
2 participants