{"action":"opened","issue":{"url":"https://api.github.com/repos/pklaus/wsgi-request-logger/issues/9","repository_url":"https://api.github.com/repos/pklaus/wsgi-request-logger","labels_url":"https://api.github.com/repos/pklaus/wsgi-request-logger/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/pklaus/wsgi-request-logger/issues/9/comments","events_url":"https://api.github.com/repos/pklaus/wsgi-request-logger/issues/9/events","html_url":"https://github.com/pklaus/wsgi-request-logger/issues/9","id":141819693,"number":9,"title":"HTTP 5xx responses not logged to access log","user":{"login":"rrva","id":887132,"avatar_url":"https://avatars.githubusercontent.com/u/887132?v=3","gravatar_id":"","url":"https://api.github.com/users/rrva","html_url":"https://github.com/rrva","followers_url":"https://api.github.com/users/rrva/followers","following_url":"https://api.github.com/users/rrva/following{/other_user}","gists_url":"https://api.github.com/users/rrva/gists{/gist_id}","starred_url":"https://api.github.com/users/rrva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rrva/subscriptions","organizations_url":"https://api.github.com/users/rrva/orgs","repos_url":"https://api.github.com/users/rrva/repos","events_url":"https://api.github.com/users/rrva/events{/privacy}","received_events_url":"https://api.github.com/users/rrva/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-18T09:48:59Z","updated_at":"2016-03-18T09:48:59Z","closed_at":null,"body":"It seems that 5xx responses are not logged to access log. \r\n\r\nExample below does not log a request at all, when the server responded with HTTP 500:\r\n\r\n```python\r\nfrom requestlogger import WSGILogger, ApacheFormatter\r\nfrom logging.handlers import TimedRotatingFileHandler\r\nfrom wsgiref.simple_server import make_server\r\n\r\ndef hello_world_app(environ, start_response):\r\n    raise Exception(\"broken\")\r\n\r\nhandlers = [ TimedRotatingFileHandler('access.log', 'd', 7) , ]\r\nloggingapp = WSGILogger(hello_world_app, handlers, ApacheFormatter())\r\n\r\nif __name__ == '__main__':\r\n    port = 8000\r\n    from wsgiref.simple_server import make_server\r\n    http = make_server('', port, loggingapp)\r\n    print \"Listening on %s\" % port\r\n    http.serve_forever()\r\n```"}}