Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP 5xx responses not logged to access log #9

Open
rrva opened this issue Mar 18, 2016 · 1 comment
Open

HTTP 5xx responses not logged to access log #9

rrva opened this issue Mar 18, 2016 · 1 comment

Comments

@rrva
Copy link
Contributor

rrva commented Mar 18, 2016

It seems that 5xx responses are not logged to access log.

Example below does not log a request at all, when the server responded with HTTP 500:

from requestlogger import WSGILogger, ApacheFormatter
from logging.handlers import TimedRotatingFileHandler
from wsgiref.simple_server import make_server

def hello_world_app(environ, start_response):
    raise Exception("broken")

handlers = [ TimedRotatingFileHandler('access.log', 'd', 7) , ]
loggingapp = WSGILogger(hello_world_app, handlers, ApacheFormatter())

if __name__ == '__main__':
    port = 8000
    from wsgiref.simple_server import make_server
    http = make_server('', port, loggingapp)
    print "Listening on %s" % port
    http.serve_forever()
@rrva
Copy link
Contributor Author

rrva commented Mar 24, 2016

ping @pklaus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant