MCPcopy Create free account
hub / github.com/Learning-and-Intelligent-Systems/proc3s / StreamToLogger

Class StreamToLogger

eval_policy.py:20–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19
20class StreamToLogger:
21 def __init__(self, logger, log_level):
22 self.logger = logger
23 self.log_level = log_level
24 self.linebuf = ""
25
26 def write(self, buf):
27 for line in buf.rstrip().splitlines():
28 self.logger.log(self.log_level, line.rstrip())
29
30 def flush(self):
31 pass
32
33
34def setup_logger():

Callers 1

setup_loggerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected