From 8eee66c5eaf6be21ca8bb9f57f7b99a42d0d68c7 Mon Sep 17 00:00:00 2001 From: Harikrishnan K <128063333+HarikrishnanK9@users.noreply.github.com> Date: Tue, 15 Jul 2025 12:34:27 +0530 Subject: [PATCH] Update instrument_logging.py --- agentops/logging/instrument_logging.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/agentops/logging/instrument_logging.py b/agentops/logging/instrument_logging.py index 472fa2fb4..6b75abbfe 100644 --- a/agentops/logging/instrument_logging.py +++ b/agentops/logging/instrument_logging.py @@ -9,6 +9,7 @@ # Global buffer to store logs _log_buffer = StringIO() +print_logger = None def setup_print_logger() -> None: """ @@ -28,7 +29,8 @@ def setup_print_logger() -> None: # Ensure the new logger doesn't propagate to root buffer_logger.propagate = False - + + global print_logger def print_logger(*args: Any, **kwargs: Any) -> None: """ Custom print function that logs to buffer and console.