Logging does not inherit the root logger's configuration
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- observability
Research direction
Start in github/init.py at lines 75-78 and inspect how the github logger is configured. Compare that behavior with the root logger and the workaround using logging.getLogger('github'); done means root configuration can propagate without messages being directly printed to stderr.
Written by the indexing model from the issue text.
Description
The following lines do not allow the github logger to let the root logger propagate all of its configuration to it.
They also cause messages to be directly printed to stderr, when one might not necessarily want that behaviour (e.g. letting rich format log messages before printing to stderr).
https://github.com/PyGithub/PyGithub/blob/5cdf6ab395c52efb652d0bc1f28fdf2e452b1b41/github/__init__.py#L75-L78
This can be worked around by doing the following:
import logging
import github
logging.getLogger('github').handlers.clear()
logging.getLogger('github').setLevel(logging.NOTSET)
- Dominant language
- Python
- Stars
- 7.8k
- Forks
- 1.9k
- Avg merge
- 17m
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PyGithub/PyGithub
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
All issues in PyGithub/PyGithub
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100