支持termcolor的Gunicorn死简单访问记录器。
gunicorn_color的Python项目详细描述
Gunicorn颜色记录器
支持termcolor的Gunicorn死简单访问记录器。
屏幕截图
使用量
只需将gunicorn_color添加到需求文件或安装它 手动:
pip install gunicorn_color
现在您可以使用gunicorn_color.Logger作为Gunicorn的记录器 类别例如:
gunicorn --access-logfile=- --logger-class=gunicorn_color.Logger wsgi::app [::]:8000
为了禁用颜色setANSI_COLORS_DISABLEDenvironment 变量:
ANSI_COLORS_DISABLED= gunicorn --access-logfile=- --logger-class=gunicorn_color.Logger wsgi::app [::]:8000