Skip to content
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

PB-511: Add request context to all logs #454

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

benschs
Copy link
Contributor

@benschs benschs commented Sep 2, 2024

Add middleware and logging filter to add the django request to all log records.
Also see: geoadmin/lib-py-logging-utilities#62

@benschs benschs force-pushed the feat-PB-511-add-request-log branch 2 times, most recently from 6b50929 to a73ab07 Compare September 4, 2024 07:09
@benschs benschs marked this pull request as ready for review September 4, 2024 07:25
@@ -81,6 +81,7 @@
# last, put everything else in between
MIDDLEWARE = [
'django_prometheus.middleware.PrometheusBeforeMiddleware',
'logging_utilities.django_middlewares.add_request_context.AddToThreadContextMiddleware',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be wise to add a comment why this middleware should be on top.

Add middleware and logging filter to add the django request to all log records.
@benschs benschs merged commit 80ec2e8 into develop Sep 4, 2024
3 checks passed
@benschs benschs deleted the feat-PB-511-add-request-log branch September 4, 2024 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants