Skip to main content

Django Decorator of Logging Request Params

Project description

Django Decorator of Logging Request Params

Installation

pip install django-logit

Usage

from logit import logit

@logit
def xxx(request):
    xxx

Settings.py

# logger setting
LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'formatters': {
        'verbose': {
            'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
        },
        'simple': {
            'format': '%(levelname)s %(message)s'
        },
    },
    'handlers': {
        'logit': {
            'level': 'DEBUG',
            'class': 'logging.FileHandler',
            'filename': '/tmp/logit.log',
            'formatter': 'verbose'
        },
    },
    'loggers': {
        'logit': {
            'handlers': ['logit'],
            'level': 'DEBUG',
            'propagate': True,
        },
    },
}

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

Uploaded Source

Built Distribution

django_logit-1.0.0-py2.py3-none-any.whl (3.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-logit-1.0.0.tar.gz.

File metadata

File hashes

Hashes for django-logit-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0debc0a62d57ecdbf263ec868dfde78abc87f8266bd1aeb86960ee11e1c5eeff
MD5 1256157cb4ca26a194a564953368bfab
BLAKE2b-256 d816e8f2a392688577c518031960319ac804982b4193a1fb82b65821fd555e19

See more details on using hashes here.

Provenance

File details

Details for the file django_logit-1.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_logit-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5205c7d8682a56f00ad06fd5e5aaa41213f04b6adbc989509a9ac727a3d908aa
MD5 76eaafa5cd8658e0b0839400415c2ee2
BLAKE2b-256 3d6fe637052b04ef0a28e8c5eaa9ad9438f044a9251e23d420663d0f14f3c55c

See more details on using hashes here.

Provenance

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