-
Notifications
You must be signed in to change notification settings - Fork 9
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
Unified logging and settings #72
Comments
Big yes. |
Should include a function to get the |
We should likely just use the standard logging module? We have a very basic setup with scvi-tools that uses rich to format the messages. |
https://github.com/Delgan/loguru looks interesting also |
Another interesting alternative that looks easier to understand (less magic API) and just as easy to use while encouraging to attach data to your log entries: https://www.structlog.org/en/stable/getting-started.html
It also promotes logging json by default if the stdlib isn’t a TTY which I really like: https://www.structlog.org/en/stable/logging-best-practices.html#pretty-printing-vs-structured-output See here how it integrates with the stdlib: https://www.structlog.org/en/stable/getting-started.html#structlog-and-standard-library-s-logging |
Should we propose a default mechanism for logging and settings?
Benefits IMO would be consistent behaviour for all ecosystem packages. Ideally there would be a way to set the logging level for all scverse packages globally.
This could either be implemented as
In the long run, a "scverse-tools" package could make sense. We kinda have something like that already with scanpydoc, but could extend the scope to other helper functions.
The text was updated successfully, but these errors were encountered: