Skip to main content

Various JSON logging extensions for the Django Framework

Project description

django_json_logging

Various JSON logging extensions for the Django Framework

PyPI Version

Installation

Using pip

pip install django_json_logging

Using pipenv

pipenv install django_json_logging

Quick start

In your project’s settings.py add AccessLogMiddleware to MIDDLEWARE and add JSONFormatter to LOGGING.

MIDDLEWARE = [
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.locale.LocaleMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    ...
    'django_json_logging.middleware.AccessLogMiddleware',
]
LOGGING = {
    ...
    'formatters': {"json": {'()': 'django_json_logging.logging.JSONFormatter'}},
    ...
}

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_json_logging-0.0.3.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

django_json_logging-0.0.3-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file django_json_logging-0.0.3.tar.gz.

File metadata

  • Download URL: django_json_logging-0.0.3.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.25.1

File hashes

Hashes for django_json_logging-0.0.3.tar.gz
Algorithm Hash digest
SHA256 3b0a6fd7cc2c27c05789da443fe2234aa6a3ad5455163f6d4bfc8ea94d5a07c7
MD5 19883f21f9d240c172290f1916bffcd6
BLAKE2b-256 273d46342470e20be2f87f14ee670cbdce13354829d40000b080a05754722965

See more details on using hashes here.

File details

Details for the file django_json_logging-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_json_logging-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 af094d8b8ca91294b2a6dc86809e111d011887350d88f3b66e43a80445ba809d
MD5 0e243c3a4851c8023c55828abe464479
BLAKE2b-256 d1f4448657fdfea66dfb283542a329736224d640942e9da04aefd08b6209b963

See more details on using hashes here.

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