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.10-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | dde4f1072ae89e6e0441feabb8934b9a072ec27ebf7254bc9dcbd7726d0689b5 |
|
MD5 | e9fcb8fb2b22dec4a238fe73b45ac124 |
|
BLAKE2b-256 | f4db336b930e54812b1f0b27e9b3ec8a714ca54ef2c1ebaea8aa58dd57acea51 |
Hashes for django-actionlog-0.9.10.macosx-10.11-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c52fad425589eb6bfedb717eb7e932bd823418021f468a775b4ab7bb488ddcd4 |
|
MD5 | e64179300314b14cbe9a5f3e61b13fca |
|
BLAKE2b-256 | f0e6fd9d36f7a199be6100cdfbe46476e282d403658c86412f04c961d96147e5 |
Hashes for django-actionlog-0.9.10.macosx-10.11-x86_64.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2b44b138770e33c3d28e32be692bc6fac6e9c2f2501b3568f6ca1bc3570128d |
|
MD5 | 1d22037b3d8cdb8a2b6b088768ff9218 |
|
BLAKE2b-256 | 83f4b6e346d20af558e7e739658d220215ad39c7d369907dcfed1b2001c9c3ff |