Color log output support for Scrapy.
pip install scrapy-colorlog
Add the following to your Scrapy project settings module:
import scrapy_colorlog
scrapy_colorlog.install()
Default:
(
"%(light_black)s%(asctime)s%(reset)s "
"%(light_black)s[%(name)s]%(reset)s "
"%(log_color)s%(levelname)s%(reset)s%(light_black)s:%(reset)s "
"%(message)s"
)
String for formatting log messages. Refer to the colorlog package documentation for available escape codes and parameters to the format string.
See also: LOG_FORMAT.
Default: "%Y-%m-%d %H:%M:%S"
String for formatting date/time, expansion of the %(asctime)s
placeholder in
COLORLOG_FORMAT.
See also: LOG_DATEFORMAT.
Default:
{
"DEBUG": "blue",
"INFO": "cyan",
"WARNING": "yellow",
"ERROR": "red",
"CRITICAL": "purple",
}
A mapping of record level names to color names. Refer to the colorlog package documentation for details.
Default: None
A mapping of names to log_colors style mappings, defining additional colors that can be used in format strings. Refer to the colorlog package documentation for details.
Default: True
Implicitly adds a color reset code to the message output, unless the output already ends with one.
Default: False
Disable color output.
See also: NO_COLOR environment variable.
Default: False
Enable color output. Takes precedence over COLORLOG_NO_COLOR.
See also: FORCE_COLOR environment variable.
Disable color output. See NO_COLOR for details.
Enable color output. Takes precedence over NO_COLOR.