#3561·PyGithub

Logging does not inherit the root logger's configuration

Author: djsigmannCreated Aug 22, 2026Updated Aug 28, 2026

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:

python
import logging

import github


logging.getLogger('github').handlers.clear()
logging.getLogger('github').setLevel(logging.NOTSET)