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

Restrict scope of modification of root logger to logging_utils #88

Open
ananthrs1 opened this issue May 18, 2022 · 1 comment
Open

Restrict scope of modification of root logger to logging_utils #88

ananthrs1 opened this issue May 18, 2022 · 1 comment

Comments

@ananthrs1
Copy link
Contributor

ananthrs1 commented May 18, 2022

scope this modification down to get_logger method in logging_utils.py

logging.root.handlers = []
logging.basicConfig(level="WARN",
format='SystemLog: %(asctime)s:%(levelname)s : %(name)s : %(lineno)d : %(message)s',
stream=sys.stdout)

@dkmiller
Copy link

Like @danrsc pointed out, the modification should be something like this:

log = logging.getLogger(__name__)

log.setFormatter(...)

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