django logging - django.request logger and extra context

后端 未结 2 1400
感情败类
感情败类 2021-02-05 11:24

Am on django 1.3., python 2.6

In the django docs here
https://docs.djangoproject.com/en/1.3/topics/logging/#django-request
it says that messages have the followi

2条回答
  •  灰色年华
    2021-02-05 11:40

    The django-requestlogging middleware plugin makes it easy to log request-related information without adjusting all your logging calls to add the request with the extra parameter. It's then just a matter of configuring your loggers.

    The following items can be logged when using django-requestlogging:

    • username
    • http_user_agent
    • path_info
    • remote_add
    • request_method
    • server_protocol

提交回复
热议问题