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

BWProject overrides user logging level #35

Open
pfairfax1 opened this issue Oct 11, 2022 · 1 comment
Open

BWProject overrides user logging level #35

pfairfax1 opened this issue Oct 11, 2022 · 1 comment
Labels
good first issue Good for newcomers

Comments

@pfairfax1
Copy link
Collaborator

@bw-matthew noticed that bwproject.py seems to override the logging level to:
logger.setLevel(logging.DEBUG). This doesn't seem right

@bw-matthew
Copy link
Contributor

bw-matthew commented Oct 11, 2022

It also configures the logging which may be inappropriate. You can use basicConfig to apply logging settings if they have not already been applied:

This function does nothing if the root logger already has handlers configured

The following code would be equivalent while respecting the configuration set by the user:

logger.basicConfig(format="%(asctime)s %(levelname)s: %(message)s", datefmt="%H:%M:%S", level=logging.DEBUG)

Although I would omit the level argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants