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 Distribution
Hashes for django-actionlog-0.9.2.macosx-10.11-x86_64.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1918e61dfdc22e7e4a0333a3d42aabbf37e95bd1ca059a817fbd095afb86149 |
|
MD5 | 3506ff5391de5030bc46a08cf287d855 |
|
BLAKE2b-256 | b178bae3fa85fdc90fb7cc72851ac4879a6785e492dba5e112bd362ea4d91747 |