From 9035363b80761fb1cc7e9c985d1ce02618cdde36 Mon Sep 17 00:00:00 2001 From: Nick80835 Date: Mon, 16 Oct 2023 19:06:34 -0400 Subject: [PATCH] move log config out of bot init --- ubot/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ubot/__init__.py b/ubot/__init__.py index 072401a..687e856 100644 --- a/ubot/__init__.py +++ b/ubot/__init__.py @@ -18,9 +18,10 @@ if sys.version_info.major < 3 or (sys.version_info.major == 3 and sys.version_in print("This program requires at least Python 3.9.0 to work correctly, exiting.") sys.exit(1) +basicConfig(format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level=INFO) +logger = getLogger(__name__) startup_time = time() loop = asyncio.get_event_loop() -logger = getLogger(__name__) class MicroBot(): @@ -30,7 +31,6 @@ class MicroBot(): loader = None def __init__(self): - basicConfig(format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level=INFO) loop.run_until_complete(self._initialize_bot()) async def _initialize_bot(self):