Module structlog.formatters.format_colorizer

Format and Colorize log entries.

Functions

FormatColorizer (format, entries, colors, opts) Format the log entries listed in entries and apply colorizers specified by colors.
color (color) Use the highlight group for the log entry
color_level () Add color to the log level based on its value.


Functions

FormatColorizer (format, entries, colors, opts)
Format the log entries listed in entries and apply colorizers specified by colors. Remaining entries will be written as key=value.

Parameters:

  • format A format to pass to string.format
  • entries The log entries to pass as arguments to string.format
  • colors A map of log entries to colorizer functions
  • opts Optional parameters
    • blacklist A list of entries to not format, default: {}
    • blacklist_all A boolean value indicating whether to format unformatted entries, default: false

Returns:

    A callable that formats the log message in the given format and colors.
color (color)
Use the highlight group for the log entry

Parameters:

  • color The name of the highlight group
color_level ()
Add color to the log level based on its value.
generated by LDoc 1.4.6 Last updated 2023-01-08 13:36:35