How to compile error message from stderr using daemonized uwsgi?

I launched uwsgi with --daemonzie=~/uwsgi.log.

I use a flask. In my flash application, if I print some message in stdin, it will display on uwsgi.log. If I type on stderr, uwsgi.logthis message will not show. How to enable uwsgi to collect messages from stderr.

The main problem is that I cannot let uwsgi.log collect the exception track after I catch some exceptions in my flash application.

+4
source share
1 answer

, , PROPAGATE_EXCEPTIONS config.

from flask import Flask
application = Flask(__name__)
application.config['PROPAGATE_EXCEPTIONS'] = True

@application.route('/')
def hello_world():
    return 'Hello World!'

Uwsgi

  --logto /var/log/uwsgi/app.log

logto2, stdout stderr.

( syslog ..), uwsgi.

+7

All Articles