CrawleeLogFormatter
Index
Methods
Properties
Methods
__init__
A default constructor.
Parameters
optionalkeyword-onlyinclude_logger_name: bool = True
Include logger name at the beginning of the log line.
optionalkeyword-onlyargs: Any
Arguments passed to the parent class.
optionalkeyword-onlykwargs: Any
Keyword arguments passed to the parent class.
Returns None
format
Format the log record nicely.
This formats the log record so that it:
- starts with the level (colorized, and padded to 5 chars so that it is nicely aligned)
- then has the actual log message, if it's multiline then it's nicely indented
- then has the stringified extra log fields
- then, if an exception is a part of the log record, prints the formatted exception.
Parameters
optionalkeyword-onlyrecord: logging.LogRecord
Returns str
Log formatter that prints out the log message nicely formatted, with colored level and stringified extra fields.
It formats the log records so that they: