12
May
django-db-log
The question came up today, if there was a database logging solution available for Django. It turned out (to my knowledge) there wasn’t. So I quickly came up with django-db-log. It’s a simply middleware which will catch exceptions in Django, and log them to the database, allowing you to easily view them via the admin or your own custom application.

View Comments Responses to "django-db-log"
you’re the man Dan … you turned my question into a functioning solution around in about 20 mins (probably less). awesome.
Hello!!!
I supose you already know django-logging:
http://code.google.com/p/django-logging/wiki/Overview
I think is a different purpose application, but this could do the job, and in some situations is even better to write objects to the filesystem than the database.
r.
Ya that’s a different purpose, but also seems useful
(I don’t actually plan to use DB logging, I simply built this on request)
Hey David!
I saw it later … seems incredibly smart, and fast !!!
r.
“The question came up today”
Haha, that question comes up EVERYDAY on the irc channel
it seems quite useful, thanks
Cool!
practical and simple + smart
Thank you
Has there been much interest in this? I’ve got a real need for this and wouldn’t mind extending it:
1. Add in a referrer field
2. Do away with the errorbatch table and instead have a custom admin view that dynamically aggregates errors on user selectable criteria.
My main use case is for logging 404′s for sites that have switched from an old URL scheme to a new. A lot of spurious 404′s come from various sources so the idea would be that this lets you separate the wheat from the chaff and use contrib.redirect to handle the important ones.
If I get any working code together on this would you object to a fork?
Well , the view of the passage is totally correct ,your details is really reasonable and you guy give us valuable informative post, I totally agree the standpoint of upstairs. I often surfing on this forum when I m free and I find there are so much good information we can learn in this forum! http://spoon8.net/
Leave A Reply