-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEAT] Add function to refresh logger state for rust (#2323)
When daft is imported it cached the current python log level to avoid grabbing the GIL for every log statement. See [this page](https://docs.rs/pyo3-log/latest/pyo3_log/#performance-filtering-and-caching) for more details. This PR exposes a method to "refresh" the cache. This is useful when the user updates the log level later in the code, like when they configure logging. Here is a example showing this. Note prior to refreshing the logger, no logs were coming out! <img width="521" alt="image" src="https://github.com/Eventual-Inc/Daft/assets/2550285/de7ad2d8-8335-4dd0-b7d5-8b36ef28d7ad">
- Loading branch information
Showing
5 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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