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 = [ ... '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.11-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | f52c91a80390632cca0c6dc9b541553b508fb5ce24d0bd6b1100bdfc3dfc37a2 |
|
MD5 | 8a93efc8b982163823107d77d51c026a |
|
BLAKE2b-256 | 3c9968520492b0021a6a109cd40ef3c852f27c8f5f22ad72d0433f9abe4cc2cf |
Hashes for django-actionlog-0.9.11.macosx-10.11-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 073cdceaf181f75b1d62cfc7c00c5770f252c3e4c3041f45ce87ba05a1cabc67 |
|
MD5 | 2f62c0cbe855c7c8795f59a532da95c3 |
|
BLAKE2b-256 | f9344ddb0fc1939b994c1c14a5ebcbc4ab3333b40494a6ce0c3a99a18442a6f8 |
Hashes for django-actionlog-0.9.11.macosx-10.11-x86_64.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 648389446cf2cb6ae026119325c4ff04a3fd72f745eea461bdd8c312913c8184 |
|
MD5 | b06e2a6dfb9b69614fc675ca39b8edcc |
|
BLAKE2b-256 | c0820296d36dffa30de7ebb0d3e784b7730ab29fdfb38b83ad3ae7386a2f3083 |