Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Efficient logging using Django and Apache (lab6.com)
8 points by jl6 on April 13, 2011 | hide | past | favorite | 2 comments


Logging in Django is meant more for writing out application logs, which can be seriously useful for support purposes.

But in no way is anybody suggesting writing an access log to the database using django, it's not what it's designed for.


At our company we have to log API usage (we're using Django+Apache). First we tried the database way, then moved to Apache logging as described here, but have finally settled on using redis. We push data into redis and have another worker which just pulls off redis every X seconds/minutes and update the database like that.

Redis is amazing at this sort of thing and the python client for it is nicely written, with great docs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: