Skip to main content
File added late

1 file was added to this release more than 14 days after its initial publication. Inspect the release files before installing.

Pre-release

This release is a pre-release and may not be stable for production use.

https://travis-ci.org/CiCiUi/django-db-logger.svg?branch=master

Django logging in database. For large projects please use Sentry

Screenshot

https://ciciui.github.io/django-db-logger/static/img/django-db-logger.png

Dependency

  • Django>=1.6

  • Python 2.6+/3.3+

License

MIT

Quick start

  1. Install

pip install django-db-logger
  1. Add “django_db_logger” to your INSTALLED_APPS setting like this

INSTALLED_APPS = (
    ...
    'django_db_logger',
)
  1. 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'
        }
    }
}
  1. Run python manage.py migrate to create django-db-logger models.

  2. 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

  1. DJANGO_DB_LOGGER_ADMIN_LIST_PER_PAGE: integer. list per page in admin view. default 10

  2. 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)

Source distribution for django-db-logger 0.1.8rc1
File Size Uploaded
django-db-logger-0.1.8rc1.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-db-logger 0.1.8rc1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

This release

0.1.8rc1 This release

2 release files

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page