Bottle:启用将错误输出到浏览器,而不是查看error_log

时间:2018-09-24 06:51:58

标签: python bottle

我正在尝试找出如何始终通过ssh和'tail -f error_log'启用错误输出到浏览器而不是logginf的方法?

在开发人员实例中,我们刚刚在生产服务器中做了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}

1 个答案:

答案 0 :(得分:1)

debug flag可能会做您想要的事情:

import bottle

# during your init
bottle.debug(True)

但是我要重申:您不应该这样做。这是security hole