ColourizedFormatter
faststream.log.formatter.ColourizedFormatter #
Bases: Formatter
A class to format log messages with colorized level names.
METHOD | DESCRIPTION |
---|---|
__init__ | Initialize the formatter with specified format strings. |
formatMessage | Format the log record message with colorized level name. |
Initialize the formatter with specified format strings.
Initialize the formatter either with the specified format string, or a default as described above. Allow for specialized date formatting with the optional datefmt argument. If datefmt is omitted, you get an ISO8601-like (or RFC 3339-like) format.
Use a style parameter of '%', '{' or '$' to specify that you want to use one of %-formatting, :meth:str.format
({}
) formatting or :class:string.Template
formatting in your format string.
Source code in faststream/log/formatter.py
formatMessage #
Formats the log message.
PARAMETER | DESCRIPTION |
---|---|
record | The log record to format. TYPE: |
RETURNS | DESCRIPTION |
---|---|
str | The formatted log message. TYPE: |