sawmill.handler.stream

class sawmill.handler.stream.Stream(stream, *args, **kw)[source]

Bases: sawmill.handler.base.Handler

Output log records to stream.

__init__(stream, *args, **kw)[source]

Initialise handler with target stream.

Note

The given stream is not managed by this handler. It is not opened or closed as it may also be being used elsewhere (such as sys.stderr).

teardown()[source]

Teardown handler.

flush()[source]

Explicitly flush the stream if supported.

output(data)[source]

Output formatted data.

data should be a list of objects able to be written to a stream.