我想禁用此图片中的日志记录(在红色框中):
我使用涡轮齿轮2.3.7。当我启动齿轮箱服务器并访问我的url http://localhost:8778。在日志中将显示访问url
例如:
127.0.0.1 - - [11/Mar/2016 16:59:06] "GET /css/bootstrap.min.css HTTP/1.1" 304 0
127.0.0.1 - - [11/Mar/2016 16:59:06] "GET /css/style.css HTTP/1.1" 304 0
127.0.0.1 - - [11/Mar/2016 16:59:06] "GET /css/style.css HTTP/1.1" 304 0
127.0.0.1 - - [11/Mar/2016 16:59:06] "GET /css/style.css HTTP/1.1" 304 0
这是因为您正在使用
wsgiref
服务器为应用程序提供服务。您可以通过在development.ini
文件的[server:main]
部分中有use = egg:gearbox#wsgiref
这一事实看到这一点仅用于开发的
wsgiref
服务器没有正确的日志记录配置,只是将所有内容输出到stderr
如果您想管理日志记录,可以切换到更适合的服务器,如waitess
只需
pip install waitress
,然后在development.ini
中输入如下内容:代替
相关问题 更多 >
编程相关推荐