Skip to main content

A simple Django app to write logging data to database

Project description

# dblogs
a package to add logging handlers to write logs into database in django project

# Quick start
1. Add "dblogs" to your INSTALLED_APPS settings;
2. Config loggings handlers to log stuff:

'handlers':{
'log_db':{
'level': 'WARNING',
'class': 'dblogs.handlers.DBHandler',
# model and expiry can be configured to your preference
# the default is dblogs.GeneralLog model and expiry is in no effect
'model': 'your.data.model',
'expiry': 10000, # unit is seconds
'formatter': 'simple',
},
}

3. Include the polls URLconf in your project urls.py;
4. Run 'python manage.py migrate' to create models to store logs;

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Files for django-dblogs, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size django-dblogs-0.1.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page