StreamLogger

class sofia_redux.visualization.utils.logger.StreamLogger(stream=None)[source]

Bases: StreamHandler

Log handler for logging messages to stdout or stderr streams.

A specialized StreamHandler that logs INFO and DEBUG messages to stdout, and all other messages to stderr. Also provides color coding of the output.

Initialize the handler.

If stream is not specified, sys.stderr is used.

Methods Summary

emit(record)

Emit log messages to terminal.

Methods Documentation

emit(record)[source]

Emit log messages to terminal.

Parameters:
recordlogging.LogRecord

The log record, with an additional ‘origin’ attribute attached by EyeLogger.makeRecord.