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

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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for django_json_logging-0.0.2.tar.gz
Algorithm Hash digest
SHA256 702dcda737a13e796da514b9699b249121a04f7dea1ee0929e019f3e0f00447b
MD5 3a887eef8d812a5ece3293c287a83c35
BLAKE2b-256 ff05e42eedb9f4b0709f01688620df6a34d0b6c18a1cea47a727e820ea68e910

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_json_logging-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 68548431a79d76490f35379570cd516d6a5f2e97ccdc6504fd878b61a7481136
MD5 545970ff6836fb455ab92279fa3d318a
BLAKE2b-256 5a92e2dd10c5518180e80d81115ff7b13b8f5c4b0f88e32a3e48760b252a4062

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