We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7515da8 commit 43d738aCopy full SHA for 43d738a
1 file changed
src/seclab_taskflow_agent/render_utils.py
@@ -8,7 +8,11 @@
8
async_output = {}
9
async_output_lock = asyncio.Lock()
10
11
-LOG_FILE = log_file_name('render_stdout.log')
+render_logger = logging.getLogger("render")
12
+file_handler = logging.FileHandler(log_file_name('render_stdout.log'))
13
+file_handler.terminator = ""
14
+render_logger.addHandler(file_handler)
15
+render_logger.propagate = False
16
17
async def flush_async_output(task_id: str):
18
async with async_output_lock:
@@ -35,6 +39,5 @@ async def render_model_output(data: str,
35
39
data = "** 🤖✏️ Gathering output from async task ... please hold\n"
36
40
if data:
37
41
if log:
38
- with open(LOG_FILE, 'a') as f:
- f.write(data)
42
+ render_logger.info(data)
43
print(data, end="", flush=True)
0 commit comments