You should be logging inside your web server, not in Django. Although it can be registered, this is not what you would normally like to do.
If you really want this, here is an example of middleware:
class RequestLoggingMiddleware(object): def process_request(self, request): syslog.syslog(' '.join([ request.META['remote_addr'], request.get_full_path(), ]))
Wolph
source share