sinacloud / sae-python-dev-guide

SAE Python开发者手册
http://sae.sina.com.cn/doc/python
462 stars 353 forks source link

请问下,如果我用flask,希望能profiling一下,该怎么办 #118

Closed billzhuang closed 9 years ago

billzhuang commented 9 years ago
from werkzeug.contrib.profiler import ProfilerMiddleware
app = Flask(__name__)
app.config['PROFILE'] = True
app.wsgi_app = ProfilerMiddleware(app.wsgi_app, restrictions=[30])

发现并没有输出trace哎,哪儿有问题么?

chanfung032 commented 9 years ago

ProfilerMiddleware应该是将日志写到stderr了,sae默认stderr会写到日志中心,详细见:http://sae.sina.com.cn/doc/python/runtime.html#id4