Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Simple logging. Stored in database, accessed in Django admin.

Project description

Simple logging to the database for django projects. Log entries are viewed in admin.

Note: Be sparing with the number of messages logged to the database. It is convenient when you want events logged that can be viewed in the django admin, but logging excessively to the database can cripple performance.


Django 1.7 or greater.


Install package:

pip install django-lumberjack

Add 'lumberjack' to your INSTALLED_APPS:



Add handler and logger configs:


    'handlers': {
        'lumberjack_handler': {
            'level': 'DEBUG',
            'class': 'lumberjack.handlers.DBHandler',
    'loggers': {
        'lumberjack': {
            'handlers': ['lumberjack_handler'],

Create database tables:

$ ./ migrate lumberjack


Example of logging in a view function:


import logging

logger = logging.getLogger('lumberjack')

def someview(request):

    logger.debug('someview was called', [__name__, 'sometag'])


        # some action

        logger.error('some action failed', [__name__, 'fml'])

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-lumberjack, version 0.2.3
Filename, size File type Python version Upload date Hashes
Filename, size django-lumberjack-0.2.3.tar.gz (2.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page