Skip to content

apple-codesign: honor verbose level to set logging level#162

Closed
reckenrode wants to merge 1 commit into
indygreg:mainfrom
reckenrode:push-uxrprnzyktyx
Closed

apple-codesign: honor verbose level to set logging level#162
reckenrode wants to merge 1 commit into
indygreg:mainfrom
reckenrode:push-uxrprnzyktyx

Conversation

@reckenrode

Copy link
Copy Markdown
Contributor

While updating rcodesign in nixpkgs, I ran into failing tests with cli_tests. It seems the verbosity flag used by the tests is not being honored. With this patch, verbosity level sets the default logging level, which can be overriden with the RUST_LOG environment variable.

Using `from_env` was only setting the logging level from the
environment. Setting `filter_level` then using `parse_default_env` sets
the logging level based on the verbosity level while still honoring the
`RUST_LOG` environment variable.

@indygreg indygreg left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Hmmm. I wonder how I got this wrong, since I'm pretty sure I copied the code from the env_logger documentation / examples. Regardless, the new code looks correct. Thanks for the fix!

I'll rebase and push locally so the PR will be marked as closed instead of merged.

@indygreg indygreg closed this in b7fab9b Nov 3, 2024
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.

2 participants