Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 1.57 KB

README.rst

File metadata and controls

55 lines (39 loc) · 1.57 KB

image

image

Django Chrome Logger

Chrome-Logger support for Django. ChromeLogger is a protocol which allows sending logging messages to the Browser.

This module implements simple support for Django. It consists of two components:

  • LoggingMiddleware which is responsible for sending all log messages associated with the request to the browser.
  • ChromeLoggerHandler a python logging handler which collects all messages.

Configuration in settings.py is as follows:

MIDDLEWARE = [
    'chromelogger.LoggingMiddleware',
    ... # other middlewares
]

LOGGING = {
    ...
    'handlers': {
        'browser': {
            'class': 'chromelogger.ChromeLoggerHandler',
        },
        ...
    },
    'loggers': {
        'django': {
            'handlers': ['console', 'browser'],
            'level': 'DEBUG',
        },
        ...
    }
}

The code lives on GitHub, where you can report Issues. The full documentation is available on ReadTheDocs.