mirror of
https://github.com/markqvist/Sideband.git
synced 2025-07-23 15:00:39 -04:00
Squelch excessive logging
This commit is contained in:
parent
cf6d88f17e
commit
f531b2ecaa
4 changed files with 37 additions and 1 deletions
|
@ -16,6 +16,7 @@ from kivy.logger import LOG_LEVELS, Logger
|
|||
|
||||
from mapview.constants import CACHE_DIR
|
||||
|
||||
import logging
|
||||
# if "MAPVIEW_DEBUG_DOWNLOADER" in environ:
|
||||
# Logger.setLevel(LOG_LEVELS['debug'])
|
||||
# Logger.setLevel(LOG_LEVELS['error'])
|
||||
|
@ -52,6 +53,18 @@ class Downloader:
|
|||
if not exists(self.cache_dir):
|
||||
makedirs(self.cache_dir)
|
||||
|
||||
logging.getLogger("urllib3").setLevel(logging.WARNING)
|
||||
logging.getLogger("urllib3.response").setLevel(logging.WARNING)
|
||||
logging.getLogger("urllib3.connection").setLevel(logging.WARNING)
|
||||
logging.getLogger("urllib3.connectionpool").setLevel(logging.WARNING)
|
||||
logging.getLogger("requests").setLevel(logging.WARNING)
|
||||
|
||||
logging.getLogger("urllib3").propagate = True
|
||||
logging.getLogger("requests").propagate = True
|
||||
logging.getLogger("urllib3.response").propagate = True
|
||||
logging.getLogger("urllib3.connection").propagate = True
|
||||
logging.getLogger("urllib3.connectionpool").propagate = True
|
||||
|
||||
def submit(self, f, *args, **kwargs):
|
||||
future = self.executor.submit(f, *args, **kwargs)
|
||||
self._futures.append(future)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue