Python 瓶子:启用错误输出到浏览器,而不是查看错误日志

Python 瓶子:启用错误输出到浏览器,而不是查看错误日志,python,bottle,Python,Bottle,我正试图找出如何通过ssh和“tail-f error_log”将错误输出到浏览器,而不是一直通过logginf 在dev实例中,我们刚刚在生产服务器中执行了debug=True? 这是我的配置: DocumentRoot /home/nikos/public_html <Directory /home/nikos/public_html> Require all granted </Directory> Alias /static /home/nikos/

我正试图找出如何通过ssh和“tail-f error_log”将错误输出到浏览器,而不是一直通过logginf

在dev实例中,我们刚刚在生产服务器中执行了debug=True? 这是我的配置:

DocumentRoot /home/nikos/public_html

<Directory /home/nikos/public_html>
    Require all granted
</Directory>


Alias /static /home/nikos/public_html/static

<Directory /home/nikos/public_html/static>
    Options +Indexes
</Directory>


WSGIPassAuthorization On

WSGIDaemonProcess clientele user=nikos group=nikos home=/home/nikos/public_html
WSGIScriptAlias /clientele /home/nikos/public_html/clientele.py process-group=clientele application-group=%{GLOBAL}

WSGIDaemonProcess downloads user=nikos group=nikos home=/home/nikos/public_html
WSGIScriptAlias /downloads /home/nikos/public_html/downloads.py process-group=downloads application-group=%{GLOBAL}

WSGIDaemonProcess www user=nikos group=nikos home=/home/nikos/public_html
WSGIScriptAliasMatch ^/(?!phpmyadmin) /home/nikos/public_html/www.py process-group=www application-group=%{GLOBAL}
用户可能会执行您想要的操作:

import bottle

# during your init
bottle.debug(True)

但我想重申:你不应该这样做。这是一个。

我不明白一些事情-为什么不能继续使用debug=True?但请注意,这被认为是不安全的,不建议在生产环境中将错误发送到浏览器。因为当我们从开发环境移动到生产环境时,我们会停用这一行:`app.run host='superhost.gr',port=8080,debug=True。那么现在我正在制作,我该如何启用它呢?啊,谢谢你的澄清,现在我明白了。我会留下一个答案。非常感谢,我错误地使用了“app.debug=True”。