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

Uploaded Source

Built Distribution

django_json_logging-0.0.5-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for django_json_logging-0.0.5.tar.gz
Algorithm Hash digest
SHA256 b0f9da48aa5b81bd589cdc90f3ef0e90855d1f7232152c101978eadec741a638
MD5 d2205367c271c023e8d975d44a240c31
BLAKE2b-256 9ab2694390c4d2a561f44cb2b7fd995e5e9ed8235832dfb520671ee23c277a43

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_json_logging-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 57d523d998fec23cd2e3ed6d6be968dc096beaaff8cb5c8ad8be758204c95385
MD5 6838bf30042c9916539f99db060e83b6
BLAKE2b-256 7283b85707d84206c8449f079579134652ec0f5e2f35930c6c925f344dbd9823

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