From cb727e36c35fa9c46bb5c16587be4934cd9451c5 Mon Sep 17 00:00:00 2001 From: zxce3 Date: Mon, 13 Sep 2021 15:24:41 +0700 Subject: [PATCH] add logging --- helpers/loggings.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 helpers/loggings.py diff --git a/helpers/loggings.py b/helpers/loggings.py new file mode 100644 index 0000000..187d1a0 --- /dev/null +++ b/helpers/loggings.py @@ -0,0 +1,14 @@ +import logging +import time + + +logging.basicConfig( + filename='bot.log', + level=logging.INFO, + format="%(asctime)s - %(name)s - %(levelname)s - %(message)s" +) +logging.getLogger("pyrogram").setLevel(logging.ERROR) +logging.getLogger("PyTgCalls").setLevel(logging.WARNING) +logging.getLogger("youtube_dl").setLevel(logging.WARNING) + +LOG = logging.getLogger(__name__) \ No newline at end of file