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

Uploaded Source

Built Distribution

django_logit-1.0.1-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.1.tar.gz.

File metadata

File hashes

Hashes for django-logit-1.0.1.tar.gz
Algorithm Hash digest
SHA256 ecb182857b20d763f03ead1cfe0484c0096533e4970ccdcd5afe50bb0dfa0ae0
MD5 fcaa49b9d68750600e517c1ba83b79ea
BLAKE2b-256 1c2e4b1be0c43231afdd430f099b9e5513df84c04b78dc6dce7e06b37eacf60a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_logit-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e2278dc5f55b0211679d9c1638ed58a6f1c1baddb439a98f9bb1e86f1bb28274
MD5 b7ada4471a6e3d40436a26ff07fb9a11
BLAKE2b-256 dcdd2c12da51e21de7872cf52706076680378eb0f120d3d8abafd30505234e7a

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