stream_task_logs#
- MonitorApi.stream_task_logs(task_id, *, file_path=None, backlog=100, max_messages=None)#
Stream log file messages for a specific task.
Subscribes to messages tagged with
task_id=<task_id>andclient_type=ansys.rep.evaluator.file_tail, and yields each message as it arrives. Optionally narrows to a single file viafile_path.- Return type:
- Parameters:
- task_id
str The task identifier to filter on.
- file_path
str,optional Filename to restrict to a single tailed file, e.g.
"console_output.txt". The default isNone.- backlog
int,optional Number of historical messages to request on connect. The default is
100.- max_messages
intorNone,optional Maximum total messages to yield before closing the connection. The default is
None, which streams indefinitely until interrupted or the server closes the connection.
- task_id
- Yields:
MonitorMessageParsed JSON message dicts from the server.