Django DB Error Logging is a software tool that logs errors from Django-based applications. It enables developers to keep track of errors and identify recurring issues, ultimately improving the quality of applications.
First, download and install the package by using distutils. To accomplish this, perform the following two actions:
1. svn checkout django-db-log
2. cd django-db-log sudo python setup.py install
After the installation process, you will have to update the settings.py and add the middleware and installed apps settings to the file.
Add the following MIDDLEWARE_CLASSES:
- django.middleware.common.CommonMiddleware
- django.contrib.sessions.middleware.SessionMiddleware
- django.contrib.auth.middleware.AuthenticationMiddleware
- djangodblog.DBLogMiddleware
Then add the next line to INSTALLED_APPS:
- django.contrib.admin
- django.contrib.auth
- django.contrib.contenttypes
- django.contrib.sessions
- djangodblog
After this, run python manage.py syncdb to create the tables for the database.
Starting to use Django-db-log is an easy task. Two new admin panels will appear in the administration page: "Errors" and "Error batches". All errors will be stored inside "Errors", whereas an overview of errors is stored in the "Error batches" page for easier viewing.
In conclusion, Django-db-log is a simple yet efficient plugin that allows you to record and view error logs with ease.
Version 1.4.0: N/A