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

Suggestions for logging behavior #76

Open
scott-5 opened this issue Sep 23, 2024 · 1 comment
Open

Suggestions for logging behavior #76

scott-5 opened this issue Sep 23, 2024 · 1 comment
Assignees

Comments

@scott-5
Copy link

scott-5 commented Sep 23, 2024

In cp2kdata/log.py, user could control log level by environment variable, however, it changes the root logger config rather than Logger instance.
I suggest using a Logger instance and keeping the root logger as default.
The reason is that although there is no problem using cp2kdata alone, if cp2kdata is imported as a dependency by other packages, then log.py here will change the logging behavior in other code, unless they additionally set the environment variable separately for this dependency. However, if the log.py here is configured with a Logger instance, it will have no impact on the use of cp2kdata alone, and loggers are independent when it is used as a dependency.

@robinzyb robinzyb self-assigned this Sep 23, 2024
@robinzyb
Copy link
Owner

I see, I will come up with an idea to fix this behavior.

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

No branches or pull requests

2 participants