Skip to main content

A Django Middleware for logging requests and responses accordingly to Zupit Standards

Project description

A Django Middleware for logging requests and responses accordingly to Zupit Standards.

Installation

Install using pip:

pip install django_zupit_logging

Configuration

Add django_zupit_logging to your INSTALLED_APPS setting:

INSTALLED_APPS = [
    ...
    'django_zupit_logging',
]

Add django_zupit_logging.middleware.ZupitLoggingMiddleware to your MIDDLEWARE setting:

MIDDLEWARE = [
    ...
    'django_zupit_logging.middleware.ZupitLoggingMiddleware',
]

Add ZUPIT_LOGGING to your settings.py file:

ZUPIT_LOGGING = {
    "APP_INSIGHTS_CONNECTION_STRING": env("APP_INSIGHTS_CONNECTION_STRING"),
}

Use enable_zupit_logger(LOGGING) to your settings.py file:

from django_zupit_logging.settings import enable_zupit_logger

if env("APP_INSIGHTS_CONNECTION_STRING"):
    enable_zupit_logger(LOGGING)

Usage

The middleware will log requests and responses accordingly to Zupit Standards.

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-zupit-logging-0.2.3.tar.gz (7.0 kB view hashes)

Uploaded Source

Built Distribution

django_zupit_logging-0.2.3-py3-none-any.whl (8.0 kB view hashes)

Uploaded Python 3

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