librelist archives

« back to archive

How do I log request data on exception?

How do I log request data on exception?

From:
Konrad Szyc
Date:
2012-12-05 @ 08:52
Hi all

I would like to configure logging in such a way that the request data
(such as origin IP, target address, GET/POST data (truncated if too
long))  is also written to the log. The document here:
http://flask.pocoo.org/docs/errorhandling/ doesn't seem to mention how
to do that. Could you suggest any solution for that?

Cheers,
Konrad