Skip to main content

Logging utility for Django

Project description

Django logging handlers

Django logging handlers is a collection of handlers for logging messages to various services, such as Telegram, Slack, Discord, and more.

Static Badge Static Badge

Quick start

  1. Install via pip
pip install django-logging-handlers
  1. Add django-logging-handlers to your INSTALLED_APPS setting like this
INSTALLED_APPS = [
    ...
    'django_logging_handlers',
]
  1. Register Logging
LOGGING = {
    ...
    "handlers": {
        ...
        "telegram": {
            "level": "ERROR",
            "class": "django_logging_handlers.handlers.TelegramHandler",
            "token": "<telegram bot token>",
            "chat": "<chat id>",
            "message": "",             # optional: if you want to add a message together
                                       #           with the traceback
            "file_name": PROJECT_NAME, # optional: if you want to edit the file name,
                                       #           defaults to "traceback.html"
        },
    },
    "loggers": {
        "django.request": {
            "handlers": [..., "telegram"],
            "level": "ERROR",
            "propagate": True,
        },
    },
}

Live Features

  • Telegram

Planned features

  • Slack
  • Discord

Project details


Download files

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

Source Distribution

django_logging_handlers-0.1.2.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

django_logging_handlers-0.1.2-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page