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.7-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16af9793053971842ea2a1d35b20bae058b3832caa0d888d83db01f66511beda |
|
MD5 | 605ffc4fcfd102d931886f4c567b5517 |
|
BLAKE2b-256 | 45ba33c7ab00da9ebaf12c566a246f40f69683419039faac2efe198890702c69 |
Hashes for django-actionlog-0.9.7.macosx-10.11-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c83fba92c0089ad9f2f91e89b81633d64abbe7ae5463c271f5ab5a017ea1f7be |
|
MD5 | 8e2c15668e7951413c06eef8b0547be7 |
|
BLAKE2b-256 | 6a33ad8411bd900ff3902844f93853578fa7724a30c458e3739f05e2b64413f5 |
Hashes for django-actionlog-0.9.7.macosx-10.11-x86_64.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25fd2afbe993dd2579fa30da25929b9e57bd59ea4491d811468b2f691b45ec6a |
|
MD5 | e305977f0a8b600123a3c2b569572487 |
|
BLAKE2b-256 | 466a7e4930e75fba385afadbcbe5c9f7663239d7a1158c3dc74aea8d223a156c |