https://github.com/null-none/django-log-errors
Django Log Viewer allows you to read & download log files in the admin page.
https://github.com/null-none/django-log-errors
django django-project logging python python3
Last synced: about 1 year ago
JSON representation
Django Log Viewer allows you to read & download log files in the admin page.
- Host: GitHub
- URL: https://github.com/null-none/django-log-errors
- Owner: null-none
- License: mit
- Created: 2022-08-15T20:10:10.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-22T11:12:48.000Z (over 3 years ago)
- Last Synced: 2025-01-26T09:28:38.862Z (about 1 year ago)
- Topics: django, django-project, logging, python, python3
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
django-log-errors
=================
Django Log Viewer allows you to read & download log files in the admin page
Installation
------------
pip install django-log-errors
Example
------------
Add app in your ``settings.py``
LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"formatters": {
"verbose": {
"format": "%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s"
},
"simple": {"format": "%(levelname)s %(asctime)s %(message)s"},
},
"handlers": {
"db_log": {"level": "DEBUG", "class": "log_errors.handler.DatabaseLogHandler"},
},
"loggers": {
"django": {
"handlers": ["db_log"],
"level": "ERROR",
"propagate": False,
},
}
}