Skip to content

Commit 6fbaa77

Browse files
HarikrishnanK9Dwij1704dot-agi
authored andcommitted
Update instrument_logging.py (#1150)
Co-authored-by: Dwij <96073160+Dwij1704@users.noreply.github.com> Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>
1 parent b6a82c5 commit 6fbaa77

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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)