From 432825b5edaa981da6081ad1b893a6a5a00390c5 Mon Sep 17 00:00:00 2001 From: "55448286+taizan-hokuto@users.noreply.github.com" Date: Mon, 4 Nov 2019 23:45:10 +0900 Subject: [PATCH] Use logger when errors occur --- pytchat/processors/compatible/processor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytchat/processors/compatible/processor.py b/pytchat/processors/compatible/processor.py index 35be738..124af35 100644 --- a/pytchat/processors/compatible/processor.py +++ b/pytchat/processors/compatible/processor.py @@ -60,8 +60,8 @@ class CompatibleProcessor: rd["snippet"] = renderer.get_snippet() rd["authorDetails"] = renderer.get_authordetails() except (KeyError,TypeError,AttributeError) as e: - print(f"------{str(type(e))}-{str(e)}----------") - print(sitem) + logger.error(f"Error: {str(type(e))}-{str(e)}") + logger.error(f"item: {sitem}") return None return rd