uwsgi 启动pyramid项目 不打印log

# pyramid dev.ini 配置文件

[loggers]
keys = root, etable_api, sqlalchemy

[handlers]
keys = console, infolog, debuglog, warnlog

[formatters]
keys = generic

[logger_root]
level = WARN
handlers = warnlog

[logger_etable_api]
level = INFO
handlers = infolog
qualname = etable_api
;propagate = 0

[logger_sqlalchemy]
level = WARN
handlers = warnlog
qualname = sqlalchemy.engine

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

[handler_infolog]
class = handlers.RotatingFileHandler
args = ('/tmp/log/etable_api_info.log','a', 20971520, 2, 'utf-8')
level = INFO
formatter = generic

[handler_debuglog]
class = handlers.RotatingFileHandler
args = ('/tmp/log/etable_api_debug.log','a', 20971520, 2, 'utf-8')
level = DEBUG
formatter = generic

[handler_warnlog]
class = handlers.RotatingFileHandler
args = ('/tmp/log/etable_api_warn.log','a', 20971520, 2, 'utf-8')
level = WARN
formatter = generic

[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s:%(lineno)s][%(threadName)s] %(message)s

[uwsgi]
socket = 127.0.0.1:6545
master = true
chdir = /home/icey.zheng/etable/research-tool-services
processes = 4
threads = 2
enable-threads = true
harakiri = 60
paste-logger = %p  
buffer-size = 32768

在uwsgi的配置里需要加

paste-logger = %p

uwsgi --ini-paste deploy/config/marketsmith/dev.ini, 会报下面的错误

uwsgi 启动pyramid项目 不打印log_第1张图片

解决: pip install PasteScript

你可能感兴趣的:(Python—错误)