Skip to content

Commit efdd605

Browse files
HarikrishnanK9Dwij1704dot-agi
authored
Update instrument_logging.py (#1150)
Co-authored-by: Dwij <[email protected]> Co-authored-by: Pratyush Shukla <[email protected]>
1 parent ac3dadc commit efdd605

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

agentops/logging/instrument_logging.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# Global buffer to store logs
1010
_log_buffer = StringIO()
1111

12+
print_logger = None
1213

1314
def setup_print_logger() -> None:
1415
"""
@@ -28,7 +29,8 @@ def setup_print_logger() -> None:
2829

2930
# Ensure the new logger doesn't propagate to root
3031
buffer_logger.propagate = False
31-
32+
33+
global print_logger
3234
def print_logger(*args: Any, **kwargs: Any) -> None:
3335
"""
3436
Custom print function that logs to buffer and console.

0 commit comments

Comments
 (0)