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.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
Built Distribution
File details
Details for the file django_json_logging-0.0.6.tar.gz
.
File metadata
- Download URL: django_json_logging-0.0.6.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0edbfd18bd1bd71c9ae37eaf5d8b1a21451aca4513402dc4e9cecd3fc9e0933f |
|
MD5 | 2ed2e5b94273739d5f3fc7b8e74d3031 |
|
BLAKE2b-256 | 7afa4c1869854449325943231d5c38fc320e0e2ae97078210512da77f51ccdbb |
File details
Details for the file django_json_logging-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: django_json_logging-0.0.6-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d678ecd12221a26460c40b6a60dca77cb4a51d2610bae31699ec6bd6b5e2bdd |
|
MD5 | c0d3b1e19f65e876f5a2a5129b8d8aa6 |
|
BLAKE2b-256 | 205848e9a9eb31f67d64bf4e1b10c66d95dcd1b0dd19c1da84e2cc5866bed247 |