log.console
import log
Everything here is re-exported by
log, soimport logis enough and the names are called aslog.*. Importinglog.consoleon its own works too and reaches the same definitions.
ConsoleTransport: the default transport, printing to stdout (or stderr
for Error/Critical) with optional ANSI coloring by level.
Classes
ConsoleTransport
class log.ConsoleTransport < Transport
ConsoleTransport is a log transport that facilitates sending log streams to the console.
ConsoleTransport.set_colors()
log.ConsoleTransport.set_colors(enabled: bool)
Enables or disables ANSI coloring of messages by level. Enabled by
default unless the NO_COLOR environment variable is set.
Parameters
enabled(bool)
Returns — self
ConsoleTransport.write()
log.ConsoleTransport.write(message, level)
ConsoleTransport.flush()
log.ConsoleTransport.flush()