1
我正在運行一個python金字塔應用程序並對其進行平穩調用。這是一個wsgi應用程序,並使用女服務員作爲http服務器。目前,當我提出一個失敗的HTTP請求,我得到這樣的消息:如何在客戶端獲取paster/waitress應用程序的服務器棧跟蹤
Internal Server Error
The server encountered an unexpected internal server error
我將如何配置女服務員或貼紙本身出現錯誤,顯示堆棧跟蹤,就像這樣:
Traceback (most recent call last):
File "/.../pyramid/eggs/waitress-0.8.8-py2.7.egg/waitress/channel.py", line 337, in service
task.service()
File "/.../pyramid/eggs/waitress-0.8.8-py2.7.egg/waitress/task.py", line 173, in service
self.execute()
...
File "/.../pyramid/eggs/pyramid-1.4.5-py2.7.egg/pyramid/config/views.py", line 469, in _class_requestonly_view
response = getattr(inst, attr)()
File "/.../pyramid/dustin/views.py", line 139, in delete
raise Exception('DELETE op failed; oid %s not found' % deleteItem)
Exception: DELETE op failed; oid 00x not found
我貼的配置是:
[app:main]
use = egg:myegg
pyramid.reload_templates = true
pyramid.debug_authorization = false
pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.debug_templates = true
pyramid.default_locale_name = es
couchdb.uri = http://couchdb-host:5984/
couchdb.db = myegg
[server:main]
use = egg:waitress#main
host = 0.0.0.0
port = 6543
# Begin logging configuration
[loggers]
keys = root
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = INFO
handlers = console
[handler_console]
class = StreamHandler
args = [sys.stdout]
level = DEBUG
formatter = generic
[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
# End logging configuration
感謝彼得..我想知道是否有辦法告訴中間件通過棧跟蹤..快速檢查告訴我,這是一個服務員,「吃」目前的例外。 – RoyM