From 420a14bb885bc71d05738722d7a3b0ddbde2fe1d Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Mon, 6 Jan 2020 22:03:18 -0800 Subject: [PATCH] Add a logger to ytapi. --- ycdl/ytapi.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ycdl/ytapi.py b/ycdl/ytapi.py index 2270068..e7f9dc1 100644 --- a/ycdl/ytapi.py +++ b/ycdl/ytapi.py @@ -1,9 +1,17 @@ import apiclient.discovery import datetime +import logging import isodate from . import helpers +logging.basicConfig(level=logging.DEBUG) +log = logging.getLogger(__name__) +logging.getLogger('googleapiclient.discovery').setLevel(logging.WARNING) +logging.getLogger('requests.packages.urllib3.connectionpool').setLevel(logging.WARNING) +logging.getLogger('requests.packages.urllib3.util.retry').setLevel(logging.WARNING) + + class VideoNotFound(Exception): pass