Add a logger to ytapi.

This commit is contained in:
voussoir 2020-01-06 22:03:18 -08:00
parent 4706a0a6a7
commit 420a14bb88

View file

@ -1,9 +1,17 @@
import apiclient.discovery import apiclient.discovery
import datetime import datetime
import logging
import isodate import isodate
from . import helpers 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): class VideoNotFound(Exception):
pass pass