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.5-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e6037daea14526db728f6f155e680d3305331308c13cb99e265bacad4f745f5 |
|
MD5 | be8ed73f899879a0d4ee2ff3ffa7d443 |
|
BLAKE2b-256 | 7739ac18426146f7c7d7201718b355e3c159f51285d4b5876187f65d0d42af97 |
Hashes for django-actionlog-0.9.5.macosx-10.11-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7b80481fa7b6ede54d68f83e6ddd37074062fffbccd64565e595f817ec1e407 |
|
MD5 | d3801e67355808a8d0b6c540dbe3b8c6 |
|
BLAKE2b-256 | 87b1fc7200ecf4fb018d58dd297287b6d2b86528edff9381c3dc638461f8592a |
Hashes for django-actionlog-0.9.5.macosx-10.11-x86_64.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ebcf7962c4fe1c51aca90c7e957a8b91656ab6d3465cc5ee86d411a9068d2a6 |
|
MD5 | 08c71e280ae9240052ebe99ceea23a10 |
|
BLAKE2b-256 | e271bf12b6d2c49ed35285b7e15764371dc28b1d610253d7cd6c51bef553b120 |