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

Debug mode triggered after importing fdk #114

Open
jizezhang opened this issue Jan 4, 2021 · 1 comment
Open

Debug mode triggered after importing fdk #114

jizezhang opened this issue Jan 4, 2021 · 1 comment

Comments

@jizezhang
Copy link

Description

Logging level changed to debug after importing fdk. This is possibly due to this line in log.py.

Steps to reproduce the issue:

import logging
print(f'DEBUG level = {logging.DEBUG}', )
print(f'Current logging level = {logging.root.level}')

import fdk
print(f'Current logging level = {logging.root.level}')

Describe the results you received:
Logging level does not equal to DEBUG before importing fdk but is changed to DEBUG after import.

Describe the results you expected:
Logging level does not change after importing fdk.

Additional information you deem important (e.g. issue happens only occasionally):

Output of FDK version (PIP output):

fdk==0.1.19

Additional environment details (python version, code sample, etc.):

@ConnorWescott-TR
Copy link

ConnorWescott-TR commented May 1, 2022

This issue still exists on the latest version.

fdk==0.1.45

Workaround:

import logging
root = logging.getLogger()
root_level = logging.root.level

import fdk

# Set root logger level back to original level
# Before importing fdk library
root.setLevel(root_level)

Please fix this issue so I don't have to write code to handle this!

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