Bib is a simple Django app to log all request made to the server and responses sent from the server.
-
Pip install:
$ pip install git://github.com/fuzz-productions/bib.git#egg=Bib
-
Add to requirements.txt:
django-bootstrap3==6.2.2 -e git://github.com/fuzz-productions/bib.git#egg=Bib
-
Add "bootstrap3" and "bib" to your INSTALLED_APPS setting like this:
INSTALLED_APPS = ( ... 'bootstrap3', 'bib', )
-
Add bib middleware to your settings:
MIDDLEWARE_CLASSES = ( ... 'bib.middleware.DumpRequestToLogMiddleware', )
-
Include the bib URLconf in your project urls.py like this::
url(r'^bib/', include('bib.urls')),
-
Run
python manage.py migrate
to create the bib models. -
In your
settings.py
, set the API_VERSION equal to your the current version and make sure all your URLS are using that reference to the API_VERSION. For example, if you're on 1.0, insettings.py
:API_VERSION = 'v1.0'
Then in your
urls.py
url(r"^%s/articles/(?P<article_id>.+)/?" % settings.API_VERSION, views.article)
Or if you're using Django Rest Framework's router:
router.register(r"%s/articles/?" % settings.API_VERSION, views.ArticleViewSet)
-
Run bib migrations:
./manage.py migrate
-
After hitting the API a few times, visit http://localhost:8000/bib/ to see all requests and responses.
Note: In settings, make sure that debug=True
. Be sure to turn debug off in production or else your database will be bloated with Bib objects.
- Set up management command to remove Bib objects based on date.
- Support for passing in a device ID to allow for a list view specific to one device
- Dashboard breakdown by status codes
- Ability to query for specific events
- Events collated by session, user, request
- Fixed links to specific logs
- Accordian UI doesn't deal with back very well maybe scrap the whole concept
- Render request headers
- Finish Test App test suite
- Make sure pep8 compliant