1 file was added to this release more than 14 days after its initial publication. Inspect the release files before installing.
This release is a pre-release and may not be stable for production use.
Django logging in database. For large projects please use Sentry
Screenshot
Dependency
Django>=1.6
Python 2.6+/3.3+
License
MIT
Quick start
Install
pip install django-db-logger
Add “django_db_logger” to your INSTALLED_APPS setting like this
INSTALLED_APPS = (
...
'django_db_logger',
)
Add handler and logger to LOGGING setting like this
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': 'django_db_logger.db_log_handler.DatabaseLogHandler'
},
},
'loggers': {
'db': {
'handlers': ['db_log'],
'level': 'DEBUG'
}
}
}
Run python manage.py migrate to create django-db-logger models.
Use django-db-logger like this
import logging
db_logger = logging.getLogger('db')
db_logger.info('info message')
db_logger.warning('warning message')
try:
1/0
except Exception as e:
db_logger.exception(e)
Options
DJANGO_DB_LOGGER_ADMIN_LIST_PER_PAGE: integer. list per page in admin view. default 10
DJANGO_DB_LOGGER_ENABLE_FORMATTER: boolean. Using formatter options to format message.``True`` or False, default False
Metadata
Release files for django-db-logger 0.1.8rc1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
File added late
1 file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release files before installing.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-db-logger-0.1.8rc1.tar.gz | 5.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_db_logger-0.1.8rc1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.1 kB
Release files / django-db-logger-0.1.8rc1.tar.gz
| Download URL | django-db-logger-0.1.8rc1.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
064b04be0e204d2c84e2ab1c10c2a4ebb6247020ee540de24f3b5ecdf68f72ef
|
|
BLAKE2b-256 checksum How to use checksums |
c070d2c203a28afab609e9fd113a6aaf419129aefcdced6efa1b34ad21462d66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
|
Release files / django_db_logger-0.1.8rc1-py3-none-any.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | django_db_logger-0.1.8rc1-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ca7a9f3b25fbb6b78800d5ba571bae65ec28ca2ee942ed5a5c2aacd54937fc24
|
|
BLAKE2b-256 checksum How to use checksums |
9a9df0b90ca1ef407ce37eaf3ff1766a91d22372154c5ab794998fdbfe911892
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7
|