A simple Django app to save logs to database
Project description
DB Logger is a simple Django app to save logs to database.
Quick start
Add “db_logger” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'db_logger', ]
Run python manage.py migrate to create the polls models.
Add handler and logger to LOGGING setting like this:
LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'verbose': { 'format': "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s", 'datefmt': "%d/%b/%Y %H:%M:%S" }, 'standard': { 'format': '%(asctime)s [%(levelname)s] %(name)s: %(message)s' }, 'simple': { 'format': '%(levelname)s %(message)s' }, }, 'handlers': { 'db_log': { 'level': 'DEBUG', 'class': 'db_logger.handlers.DbLogHandler' }, }, 'loggers': { '': { 'handlers': ['db_log'], 'level': 'DEBUG', } } }
Visit /admin/db_logger/dblogentry/ to check the 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
db-logger-1.0.tar.gz
(3.0 kB
view details)
Built Distribution
File details
Details for the file db-logger-1.0.tar.gz
.
File metadata
- Download URL: db-logger-1.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2092d99dfb7712af2f082798a95a64113800be4be48615203fbc4a1f3844bf2 |
|
MD5 | 83a8754425d684ad1e741db12c3b68c9 |
|
BLAKE2b-256 | 3ccac89b48ec7a2fc82ecd4e5594b556d6ac89c280949ede798a53f5790810e7 |
File details
Details for the file db_logger-1.0-py3-none-any.whl
.
File metadata
- Download URL: db_logger-1.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6108b1414c73b133e74b2229617efced8ed1c85edc2584478a9988a6790ef48 |
|
MD5 | 33faad38aedf6c3efa2b9c193a78025b |
|
BLAKE2b-256 | c1299ceff2cb107e464855b341a2b82b8b484e9134fd2952571e518217dead31 |