From e2634f7a5052f0507b245b30e2f2bc25963f863f Mon Sep 17 00:00:00 2001 From: dkg Date: Sat, 1 Sep 2018 05:14:32 -0700 Subject: Logging cleanup --- libmat2/torrent.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'libmat2/torrent.py') diff --git a/libmat2/torrent.py b/libmat2/torrent.py index 90f83f8..049807b 100644 --- a/libmat2/torrent.py +++ b/libmat2/torrent.py @@ -3,9 +3,6 @@ from typing import Union, Tuple, Dict from . import abstract -logging.basicConfig(level=logging.ERROR) - - class TorrentParser(abstract.AbstractParser): mimetypes = {'application/x-bittorrent', } whitelist = {b'announce', b'announce-list', b'info'} @@ -123,9 +120,9 @@ class _BencodeHandler(object): try: ret, trail = self.__decode_func[s[0]](s) except (IndexError, KeyError, ValueError) as e: - logging.debug("Not a valid bencoded string: %s", e) + logging.warning("Not a valid bencoded string: %s", e) return None if trail != b'': - logging.debug("Invalid bencoded value (data after valid prefix)") + logging.warning("Invalid bencoded value (data after valid prefix)") return None return ret -- cgit v1.3