-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request.user #120
Comments
if we get unique request id in logs for |
The variability of authentication setups would make it tricky to make universal. But here is a system that we use to add additional context to our logs, including user information and ip address. You can add additional information to the logs using filters:
For the actual
The
Let us know if something like that works for you. |
Here is the trick I use create a
update settings MIDDLEWARE = [
...,
'path.to.custom.class.CustomLoggingMiddleware',
...,
] Hope it helps |
I appreciate everyone for the help. Whist i had fixed my need at the time of opening this issue(filters did it), i felt like it would be an improvement on the library. |
Request headers should include request user and ip address. It helps the aim of logging.
The text was updated successfully, but these errors were encountered: