**************************************************************
zc.wsgirunner的Python项目详细描述
Run WSGI applications defined by paste.deploy configurations
内容
提供了一个脚本run-wsgi,该脚本运行定义的wsgi应用程序 在Paste Deployment配置中 文件夹。例如,给定一个配置文件,paste.ini:
[app:main] use = egg:bobo bobo_resources = myapp [pipeline:debug] pipeline = debug reload main [filter:reload] use = egg:bobo#reload modules = zc.wsgirunner.tests [filter:debug] use = egg:bobo#debug [server:main] use = egg:waitress host = localhost port = 8080 [configure:main] use = call:myapp:config key = 42 [logging:main] log = INFO
我们可以使用[1]:
运行应用程序run-wsgi paste.ini
如果要运行调试管道:
run-wsgi -a debug paste.ini
Logging and configuration
zc.wsgirunner使用 logging和configuration部分。
与其他部分一样,您可以有多个部分并选择 使用命令行选项需要哪一个。
Logging sections
日志部分有两种类型,zconfig和basic。如果日志记录 节有一个config选项,它的值被传递ZConfig’s[2]configureLoggers 方法。否则,日志部分中的选项将传递给 logging.basicConfig。
Configuration sections
配置部分用 use选项,与其他粘贴部署部分一样。这个 使用全局默认值和选项调用配置对象 从配置部分。
Changes
0.1.0(2014-04-12)
初始版本
[1] | You should use a tool like ZDaemon or supervisord with ^{tt1}$ in production. ^{tt1}$ doesn’t daemonize itself. |
[2] | ZConfig provides the easiest way to create non-trivial logger configurations. Note, however, that ZConfig isn’t a dependency of ^{tt3}$, so if you want to use ZConfig to configure logging, you need to install it separately. |