Skip to main content

Admin logs for django like in Google Application Engine

Project description

About

This small module for django allows you to store requests in your database(now supports only database) and then look at them in django admin. This module was inspired by logs in Google Application Engine

Configure

Include this lines to your settings.py:

INSTALLED_APPS += ('admin_logs', )
MIDDLEWARE_CLASSES = ('admin_logs.middleware.LogRequestMiddleware', ) + MIDDLEWARE_CLASSES  # place middleware as early as possible

ADMIN_LOGS_BACKEND = 'admin_logs.backends.database.DatabaseBackend'  # now supports only database

from admin_logs import setup_level
setup_level('INFO')  # set minumum log level that will be written to logs

Working

Anywhere in the code you can run:

import logging
logging.warning('Test')

And this warning will be written to logs and you can check it later.

Project details


Download files

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

Source Distribution

admin_logs-0.1.1.zip (13.0 kB view hashes)

Uploaded Source

Built Distribution

admin_logs-0.1.1-py2-none-any.whl (11.9 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page