betty.logging module - Betty documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.logging module

Provide logging utilities.

class betty.logging.CliHandler

  Bases: `StreamHandler`

  A logging handler for Betty’s Command Line Interface.

  COLOR_LEVELS = {0: 97, 10: 97, 20: 92, 30: 93, 40: 91, 50: 91}
  __init__()

    Initialize the handler.

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

  format(record: logging.LogRecord) → str

    Format the specified record.

    If a formatter is set, use it. Otherwise, use the default formatter for the module.

    Parameters:

      record (`logging.LogRecord`)

    Return type:

      `str`