CherryPy服务器将其错误日志写入何处?我已经安装了CherryPy,并用python3.2启动了服务器
from cherrypy import wsgiserver
def my_crazy_app(environ, start_response):
status = '200 OK'
response_headers = [("Content-type","text/plain")]
start_response(status, response_headers)
return ['Hello world!']
server = wsgiserver.CherryPyWSGIServer(
('0.0.0.0', 80), my_crazy_app,
server_name='www.cherrypy.example')
server.start()当我转到url时,页面不会加载,也不会打印错误。
发布于 2012-08-16 20:09:27
您需要指定错误或访问日志文件名。您可以在配置文件中执行此操作...
[global]
log.error_file = 'Web.log'
log.access_file = 'Access.log'或者在Python文件中...
cherrypy.config.update({'log.error_file': Web.log,
'log.access_file': Access.log
})我认为你得到了一个“端口80不可用”的错误。尝试将端口更改为8080。
安德鲁
https://stackoverflow.com/questions/11982438
复制相似问题