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

Uploaded Source

Built Distribution

django_json_logging-0.0.7-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for django_json_logging-0.0.7.tar.gz
Algorithm Hash digest
SHA256 6fcba1b057b4b9f811b4291b33437fef251c018a21d1f6713baab14c245cdfad
MD5 d50d7890cfd139161c5d5a00cace0683
BLAKE2b-256 04f1094912d8460d1e2eb49c551a8be5e3ecae2622e41166c0c8c6cd02acfd00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_json_logging-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3b6d33ee639b3581a88037e61b3c962150c450d55081334ca47b3a28e5266a7d
MD5 d185a98e4b88ec19b000970b2fe16c73
BLAKE2b-256 773568deb65dd645595f4891c25626fa8ce5e64e0828a4e750e6a0f582c55493

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