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.9-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 709f21d48dbbd41368476e35eccbdd9844f9a3382bb60cf3ebed60a27c1ddb17 |
|
MD5 | e898844844589671914c5cbb5b102853 |
|
BLAKE2b-256 | af5740ea1e0b219f291ea44fa82dcad52ab46044e50aed04f0121f922ba402be |
Hashes for django-actionlog-0.9.9.macosx-10.11-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 433f9e600f4be29213a66845ca180a863279d33e3875ae1716a6ad07aadc7165 |
|
MD5 | bc6d50088786fee193e929da1b3adc2c |
|
BLAKE2b-256 | 96ebf64f28291da36b05a2cd8d0b7d090135f90911287cf4b416f77a7d4908b4 |
Hashes for django-actionlog-0.9.9.macosx-10.11-x86_64.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | dec8c18778f2a969109dc54efd02bad88492a7af4077f55ba22a5480c3ba18ca |
|
MD5 | 5f8b06d8b79c3a8269a5ce7f528a71d0 |
|
BLAKE2b-256 | a21eb57008f1863c15a41f01ee02d6afdedb306d784fbce2e2104df0ad8b0852 |