Module logs

Source
Expand description

Helpers for capturing logs from Fuchsia processes.

Structs§

LogStreamReader
Collects logs in background and gives a way to collect those logs.
LoggerStream
A stream bound to a socket where a source stream is captured. For example, stdout and stderr streams can be redirected to the contained socket and captured.
SocketLogWriter
Utility struct to write to socket asynchrously.

Enums§

LogError
Error returned from draining LoggerStream or writing to LogWriter.
LoggerError
Error returned by this library.

Functions§

create_log_stream
Creates a socket handle for stdout/stderr and hooks it to a file handle. It also wraps the socket into stream and returns it back.
create_std_combined_log_stream
Creates a combined socket handle for stdout and stderr and hooks them to same socket. It also wraps the socket into stream and returns it back.