Skip to content

Commit bf2a842

Browse files
ninatumartinarroyo
andcommitted
Refactor: Output maxlogging to both logger and stdout
Modify the log function to write to both the standard logger and stdout. This ensures visibility in environments where logger output might not be readily accessible. Co-authored-by: martinarroyo <martinarroyo@google.com>
1 parent 4afed9f commit bf2a842

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/maxdiffusion/max_logging.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616

1717
"""Stub for logging utilities. Right now just meant to avoid raw prints"""
1818

19+
import logging
20+
21+
logger = logging.getLogger(__name__)
22+
1923

2024
def log(user_str):
25+
logger.info(user_str)
2126
print(user_str, flush=True)

0 commit comments

Comments
 (0)