StreamedLog
Hierarchy
- StreamedLog
Index
Methods
Methods
__init__
Initialize
StreamedLog
.Parameters
to_logger: logging.Logger
The logger to which the logs will be redirected.
optionalkeyword-onlyfrom_start: bool = True
If
True
, all logs from the start of the actor run will be redirected. IfFalse
, only newly arrived logs will be redirected. This can be useful for redirecting only a small portion of relevant logs for long-running actors in stand-by.
Returns None
Utility class for streaming logs from another Actor.
It uses buffer to deal with possibly chunked logs. Chunked logs are stored in buffer. Chunks are expected to contain specific markers that indicate the start of the log message. Each time a new chunk with complete split marker arrives, the buffer is processed, logged and emptied.
This works only if the logs have datetime marker in ISO format. For example,
2025-05-12T15:35:59.429Z
This is the default log standard for the actors.