[Flask] Finding error in Flask app while running under web server

Alex Hall ahall at autodist.com
Tue May 10 12:41:57 EDT 2016


Thanks, good to know I'm not missing another automatic log file somewhere.

I also discovered that you can set catch-exceptions in UWSGI to true, and
that will cause any problems to be printed. That may not help Flask
directly, but it explains why my UWSGI log was always empty, as it showed a
permissions problem with the file. If I printed with Flask, I wouldn't have
seen anything, and I would never have known why were it not for
catch-exceptions.

On Tue, May 10, 2016 at 12:35 PM, Anthony Ford <ford.anthonyj at gmail.com>
wrote:

> Yeah, your best bet is probably to try some logging in Python.
>
> If I'm not mistaken, you can cheat by just "print"ing to STDOUT, and uwsgi
> should record that in its log, but in the long run, setting up proper
> logging is probably best (even with how much of a PITA the python logging
> module is).
>
>
>
> Anthony Ford,
> KF5IBN,
> ford.anthonyj at gmail.com
>
> On Tue, May 10, 2016 at 11:07 AM, Alex Hall <ahall at autodist.com> wrote:
>
>> Hello list,
>> I'm delighted to say that, not five minutes ago, my app ran under Nginx!
>> I'm still not totally sure how it's doing it, but it is. Now, though, I'm
>> running into a problem: something is timing out. I can see that in the
>> Nginx log, and my page displays a generic error message, one it shows if
>> anything goes sideways while talking to the database or interpreting
>> results.
>>
>> I'm pretty sure the issue is in my app's communication with our AS400,
>> but I don't know how to double check that. The UWSGI log for this app is
>> empty, which doesn't surprise me as this is likely a problem with my app's
>> code. Is Python logging the best way to go here, or is there some automated
>> log I'm overlooking?
>>
>> Thanks for any answers, and thanks again for everyone's help. I'm
>> thrilled that this finally--almost--works. It renders properly, which is
>> the main thing. Hopefully, it'll all be downhill from here. :)
>>
>> --
>> Alex Hall
>> Automatic Distributors, IT department
>> ahall at autodist.com
>>
>> _______________________________________________
>> Flask mailing list
>> Flask at python.org
>> https://mail.python.org/mailman/listinfo/flask
>>
>>
>


-- 
Alex Hall
Automatic Distributors, IT department
ahall at autodist.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20160510/d214a4c8/attachment.html>


More information about the Flask mailing list