Skip to main content

WSGI logging and event reporting middleware

Project description

Supports logging events in WSGI applications to STDOUT, time rotated log files, email, syslog, and web servers. Also supports catching and sending HTML-formatted exception tracebacks to a web browser for debugging.

Simple usage example:

from wsgilog import log

@log(tohtml=True, tofile='wsgi.log', tostream=True, toprint=True)
def app(environ, start_response):
    print 'STDOUT is logged.'
    environ['wsgilog.logger'].info('This information is logged.')
    # Exception will be logged and sent to the browser formatted as HTML.
    raise Exception()

if __name__ == '__main__':
     from wsgiref.simple_server import make_server
     http = make_server('', 8080, app)
     http.serve_forever()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for wsgilog, version 0.3.1
Filename, size File type Python version Upload date Hashes
Filename, size wsgilog-0.3.1-py2-none-any.whl (6.0 kB) File type Wheel Python version 2.7 Upload date Hashes View hashes
Filename, size wsgilog-0.3.1.tar.bz2 (4.7 kB) File type Source Python version None Upload date Hashes View hashes
Filename, size wsgilog-0.3.1.zip (7.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page