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;
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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-dblogs-0.1.tar.gz
(3.3 kB
view details)
File details
Details for the file django-dblogs-0.1.tar.gz.
File metadata
- Download URL: django-dblogs-0.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c40640732689238b0da0bc589903601e6ab4bc9c956e69dea080814ba1a38f1
|
|
| MD5 |
448e2fd38ea770cad0484ca42e0da025
|
|
| BLAKE2b-256 |
b09a6904b19928f2a33dd2cc9e3efc830b41bc42b986d455b770a63b122b517b
|