-
Notifications
You must be signed in to change notification settings - Fork 555
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A few log level handling cleanups (#6393)
This PR does two things: 1. Centralize `verbose` <-> log level handling Previously we had conversion to/from the `logger.level_enum` and `verbose` parameters strewn across the codebase. We now centralize this in 2 common utility functions. In the future we should also aim to reduce the number of places where we need to handle this at all, but for now this is a slight improvement. 2. Properly translate `verbose` to `level_enum` in `simpl_set.pyx` Previously we weren't translating `verbose` to `level_enum` in the `simpl_set` functions. This meant that the default value (`False`) would be cast to `level_enum`, resulting in the logger being set to `0` (trace). This doesn't fix the larger issue that our `verbose` handling mutates the global logger settings. It does ensure we're at least mutating it to the correct enum value though. Authors: - Jim Crist-Harif (https://github.com/jcrist) Approvers: - Simon Adorf (https://github.com/csadorf) URL: #6393
- Loading branch information
Showing
6 changed files
with
52 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters