Skip to content

Commit 242c391

Browse files
committed
Troubleshooting chatbot log init
1 parent fc185af commit 242c391

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

chatbot_core/chatbot_abc.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from typing import Optional
2727
from ovos_config.config import Configuration
2828

29-
from neon_utils.logger import LOG
29+
from neon_utils.log_utils import init_log
3030

3131

3232
class ChatBotABC(ABC):
@@ -48,8 +48,10 @@ def __init__(self, bot_id: str, config: dict = None):
4848
def log(self):
4949
if not self.__log:
5050
# Copy log to support multiple bots in thread with different names
51-
self.__log = LOG.create_logger(self._bot_id)
52-
LOG.info(f"Initialized logger with level: {self.__log.level}")
51+
log = init_log(log_name="chatbots")
52+
self.__log = log.create_logger(self._bot_id)
53+
log.info(f"Initialized logger {self.__log.name} with level: "
54+
f"{self.__log.level}")
5355
name = f"{self._bot_id} - "
5456
stack = inspect.stack()
5557
record = stack[2]

0 commit comments

Comments
 (0)