Is there a way to inject an application level username or id (in this case, the django username or id) into the Apache or ngnix log? Note that I’m not asking about the HTTP auth username.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
We do something like this, only we tell Apache to store the the Django sessionid cookie.
It’s sort of a two-step process to map the sessionid to the user, but it’s easy to implement. You could do something similar by setting a cookie with the explicit ID in it and then using the custom log to capture it.