You can check the python-time, sql-time and query-count for each request for Django
Project description
Getting Started
Django Action is can be check the python-time, sql-time and query-count for each requests for the Django Framework. Result outputs the log to file, console or fluentd.
Requirements
Django Actionlog requires Django 1.6 or later
fluent-logger 0.4.1 or later
Getting It
You can get Django Actionlog by using pip or easy_install:
$ pip install django-actionlog or $ easy_install django-actionlog
If you want to install it from source, grab the git repository from GitHub and run setup.py:
$ git clone git://github.com/fujimisakari/django-actionlog.git $ cd django-actionlog $ python setup.py install
Installing It
To enable django-actionlog in your project you need to add it to MIDDLEWARE_CLASSES and ACTION_LOG_SETTING in your projects settings.py file:
MIDDLEWARE_CLASSES = ( ... 'django_actionlog.middleware.ActionLogMiddleware', ... ) # Action Log ACTION_LOG_SETTING = {'handler_type': 'stdout'}
Using It
Case of output runserver console
ACTION_LOG_SETTING = {'handler_type': 'stdout'}
Case of output file
# default logfile: `/tmp/django_action.log` ACTION_LOG_SETTING = {'handler_type': 'file', 'logfile': '/tmp/my_action.log'}
Case of output fluentd
# default host: `localhost` # default port: `24224` # default tag_name: `django.actionlog` ACTION_LOG_SETTING = {'handler_type': 'fluentd', 'host': 'example.com', 'tag_name': 'my_service.foo'}
Case of want to output custom actionlog
from django-actionlog import actionlog ... actionlog.log({'foo': 'bar', 'fizz': 'buzz'...}) ...
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
Built Distributions
Hashes for django_actionlog-0.9.6-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 900e986c42547aafe330962ecaecd8b5de621f5e6cd0a1ccc9e7f87da6e68d4b |
|
MD5 | 09ff1669a432f4540e4ba6559e239259 |
|
BLAKE2b-256 | ac394e2eafd92670171edcd71c411d1431bb235db9abb658bf979808aebb7e12 |
Hashes for django-actionlog-0.9.6.macosx-10.11-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fedb508e379917a533bcfad48bac1c22780812695cb9d2e855026e1f80bd4527 |
|
MD5 | 284985e9c06214678966d11adcac2a12 |
|
BLAKE2b-256 | ef750dd092c6074d9da37ddf349ecba170af0039cbc12cfb838331ae6fe5640f |
Hashes for django-actionlog-0.9.6.macosx-10.11-x86_64.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe71e6bb170f570c7bb5883367e982023a635bb19b8185a1e0b3908e34a596ea |
|
MD5 | ada70a3c6b036ddffc82cfced8f6643d |
|
BLAKE2b-256 | 3ff9611aea0cf6e3a1544d486f41cef52c948d312ebdb130f67ef478e94b307a |