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.4-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 279004ff1c8a92feb177e366b0efbdbb6a2a694dc67b41828b29b617028cd881 |
|
MD5 | 99d921a6beb0dfca543e8f6fa021b025 |
|
BLAKE2b-256 | 1e8a5520bfa9477382adf71e47cce7270254280ec7d7a41feb4abe01f594e42d |
Hashes for django-actionlog-0.9.4.macosx-10.11-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | df32aa3eb1a9c61598e2647ab02c2c200fe6208316f45faec0ba2a12ebb2fad2 |
|
MD5 | 1b1a8b72ee412eb2e4e752a4f3fdc137 |
|
BLAKE2b-256 | d0ca589efa16352d15fa335446e0e8d0ea1c7ad19740673934536ecbace17f46 |
Hashes for django-actionlog-0.9.4.macosx-10.11-x86_64.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63fa7c409607a091a28f2aebed7097c65945c69d04285de01590d24c22c2b3f3 |
|
MD5 | 9164e15017644b35a20b7c03e88461e4 |
|
BLAKE2b-256 | ee8119494d9e5b863531300d8a40d723eafc8ec2f882dd4fd2963c0e3f6897ea |