From a931f06c47736501ba4ecec4527f32829b5df81a Mon Sep 17 00:00:00 2001 From: Carlos Mesquita Date: Wed, 31 Jul 2024 15:03:00 +0100 Subject: [PATCH] Forgot to add __name__ in getLogger() don't know if it is harmless grabbing the root logger, added __name__ just to be safe --- training_content/gpt.py | 2 +- training_content/kb.py | 2 +- training_content/service.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/training_content/gpt.py b/training_content/gpt.py index b2e1fb6..60020c2 100644 --- a/training_content/gpt.py +++ b/training_content/gpt.py @@ -12,7 +12,7 @@ class GPT: def __init__(self, openai_client): self._client = openai_client self._default_model = "gpt-4o" - self._logger = getLogger() + self._logger = getLogger(__name__) def prediction( self, diff --git a/training_content/kb.py b/training_content/kb.py index 5b17629..dbca899 100644 --- a/training_content/kb.py +++ b/training_content/kb.py @@ -14,7 +14,7 @@ class TrainingContentKnowledgeBase: self._tips = None # self._read_json(path) self._category_metadata = None self._indices = None - self._logger = getLogger() + self._logger = getLogger(__name__) @staticmethod def _read_json(path: str) -> Dict[str, any]: diff --git a/training_content/service.py b/training_content/service.py index 08f9c42..5259228 100644 --- a/training_content/service.py +++ b/training_content/service.py @@ -20,7 +20,7 @@ class TrainingContentService: def __init__(self, kb, openai, firestore): self._training_content_module = kb self._db = firestore - self._logger = getLogger() + self._logger = getLogger(__name__) self._llm = openai def get_tips(self, stats):