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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_json_logging-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 722b1a7286636f2e9fd8b90bbb2650adcd6951809387f8394e92ea53bd5ddb31
MD5 25aab04449ed106e4fde569cd6f7d015
BLAKE2b-256 5589b5ecaf8b688e92a4dd4a0ad68448bd075a8f0348ba685b4da8eabb0996b2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_json_logging-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4dfd317c355a94d2d169683489f65dd14fe7c98470364242c8e715c78a8c8612
MD5 645d0d0e59c8c4ff68ff166690ced815
BLAKE2b-256 2b6202d9dab289026588b438f21c480c385970df4718387f8190ad2caa04d114

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