From 738fc9ba8e53d7f5f7cfbbe3cf7ff18e2a097694 Mon Sep 17 00:00:00 2001 From: Boris Arzentar Date: Sat, 29 Mar 2025 19:14:16 +0100 Subject: [PATCH] feat: add LoggerInterface --- cognee/shared/logging_utils.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/cognee/shared/logging_utils.py b/cognee/shared/logging_utils.py index 13abd66c6..f4b6141a8 100644 --- a/cognee/shared/logging_utils.py +++ b/cognee/shared/logging_utils.py @@ -117,7 +117,24 @@ class PlainFileHandler(logging.FileHandler): self.flush() -def get_logger(name=None, level=None): +class LoggerInterface: + def info(self, msg, *args, **kwargs): + pass + + def warning(self, msg, *args, **kwargs): + pass + + def error(self, msg, *args, **kwargs): + pass + + def critical(self, msg, *args, **kwargs): + pass + + def debug(self, msg, *args, **kwargs): + pass + + +def get_logger(name=None, level=None) -> LoggerInterface: """Get a configured structlog logger. Args: