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.8-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07bbde66d58177e22fe97319d8d9070d3edd406dc7cbf1a54cf5968ad2779d57 |
|
MD5 | 0d55cde9928764031641f3ba74d7e45f |
|
BLAKE2b-256 | bf5175ef67251dc8272be28be139e9c7777b5aab2218db9e055f9347891a14c0 |
Hashes for django-actionlog-0.9.8.macosx-10.11-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16038a02f1b29ece79d2720ac62622d89d00f7f124c8c746699eb59c89772cb1 |
|
MD5 | b314d99d942a79995c8ba7a144722bf4 |
|
BLAKE2b-256 | c65a9f8c201b60b9ce207d5dac5240b913a246f648152dd736ae332441e89f1b |
Hashes for django-actionlog-0.9.8.macosx-10.11-x86_64.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e4e446f7889f15edaad58d431f038244c5a1b7594eed57ec8433f0b4a3b815b |
|
MD5 | 8b949b012808975a083ef551469c09fd |
|
BLAKE2b-256 | 99456c86fe7badbef39f3b5864d8ea320c45689e7db9fe4e0a8214e63d69a51f |