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
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
Close
Hashes for django_logit-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2278dc5f55b0211679d9c1638ed58a6f1c1baddb439a98f9bb1e86f1bb28274 |
|
MD5 | b7ada4471a6e3d40436a26ff07fb9a11 |
|
BLAKE2b-256 | dcdd2c12da51e21de7872cf52706076680378eb0f120d3d8abafd30505234e7a |