14 lines
351 B
Python
14 lines
351 B
Python
"""Timestamped stderr logging.
|
|
|
|
stderr rather than stdout: dora reads a dynamic node's stdout, and a print that
|
|
lands there is noise in the wrong stream.
|
|
"""
|
|
|
|
import sys
|
|
import time
|
|
|
|
|
|
def log(message: str) -> None:
|
|
"""Print a timestamped line for the node."""
|
|
print(f"[joy {time.strftime('%H:%M:%S')}] {message}", file=sys.stderr, flush=True)
|