diff options
Diffstat (limited to 'gitlab/client.py')
-rw-r--r-- | gitlab/client.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gitlab/client.py b/gitlab/client.py index 94fb66a..3b1e49b 100644 --- a/gitlab/client.py +++ b/gitlab/client.py @@ -1,5 +1,6 @@ """Wrapper for the GitLab API.""" +import logging import os import re import time @@ -14,6 +15,8 @@ import gitlab.const import gitlab.exceptions from gitlab import _backends, utils +LOG = logging.getLogger(__name__) + REDIRECT_MSG = ( "python-gitlab detected a {status_code} ({reason!r}) redirection. You must update " "your GitLab URL to the correct URL to avoid issues. The redirection was from: " @@ -540,7 +543,6 @@ class Gitlab: @staticmethod def enable_debug() -> None: - import logging from http.client import HTTPConnection # noqa HTTPConnection.debuglevel = 1 @@ -549,6 +551,7 @@ class Gitlab: requests_log = logging.getLogger("requests.packages.urllib3") requests_log.setLevel(logging.DEBUG) requests_log.propagate = True + LOG.debug("Enabled debug mode for python-gitlab") def _get_session_opts(self) -> Dict[str, Any]: return { |