Skip to content

Commit e6061a9

Browse files
committed
Suppress urllib3 connection pool warnings unless verbose mode is enabled
What changed: - In config_logging(), when not in verbose mode, the urllib3.connectionpool logger is set to ERROR, suppressing WARNING messages like 'Connection pool is full'. - In verbose mode, the logger uses the default level, so warnings are still shown. How it works: - Normal mode: urllib3 connection pool warnings are suppressed (only ERROR and above are shown). - Verbose mode (--verbose): warnings are shown as usual. This addresses the GitHub issue requirement. The warnings will no longer clutter the output during normal operation, but will still be visible when debugging with --verbose.
1 parent 40e1ac2 commit e6061a9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎gitlabber/cli.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ def config_logging(verbose: bool, print_mode: bool) -> None:
118118
os.environ["GIT_PYTHON_TRACE"] = "full"
119119
else:
120120
logging.getLogger().setLevel(logging.INFO)
121+
# Suppress urllib3 connection pool warnings unless verbose mode is enabled
122+
logging.getLogger("urllib3.connectionpool").setLevel(logging.ERROR)
121123

122124

123125
def _version_callback(value: bool) -> None:

0 commit comments

Comments
 (0)