finam.tools.LogStdOutStdErr#

class finam.tools.LogStdOutStdErr(logger=None, level_stdout=20, level_stderr=30)[source]#

Bases: AbstractContextManager

Context manager to redirect stdout and stderr to a logger.

Parameters:
  • logger (string, None or logging.Logger instance, optional) – Logger name for this writer. Will be the root logger by default.

  • level_stdout (integer, optional) – Logging level for stdout, by default logging.INFO

  • level_stderr (integer, optional) – Logging level for stderr, by default logging.WARN