> Hi, > > I am using uWSGI 1.9.18.2 with the following config: > > logformat = [%(ltime)] %(addr) %(method) http://%(host)%(uri) %(status) > pid=%(pid) in %(msecs)ms > disable-logging = true > log-5xx = true > log-4xx = true > log-slow = true > log-big = true > > I can see 404 errors formatted. However, the Broken pipe error has no URL > context. > > uwsgi_response_write_headers_do(): Broken pipe [core/writer.c line 216] > IOError: write error > > > I need to diagnose Broken pipe with specific URLs. How can I make uWSGI > log > the IOError with logformat? > >
Unfortunately SIGPIPE runs in a signal handler, unless it is perfectly safe to retrieve request data (and it happens rarely) it will not print it. By the way you gave me an idea: as every request with write errors is marked, we can add log-ioerror (as well as log-4xx) so you can directly log them as the others. To help catching read/write errors in logs three log vars have been added: %(werr) -> report the number of write errors for the request %(rerr) -> report the number of read errors for the request %(ioerr) -> the sum of the previous one patch1: https://github.com/unbit/uwsgi/commit/0ab1cfacc95abecc2d4894bdd4a1fdc5f0efe28c patch2: https://github.com/unbit/uwsgi/commit/b3047667183465fe6eb7540a4df0c64e12d19ca9 -- Roberto De Ioris http://unbit.it _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
