-
Notifications
You must be signed in to change notification settings - Fork 0
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
[#1784] fix runtime configuration for django-log-outgoing-requests #75
Conversation
I do have to note that with all options available for django-log-outgoing-requests, it might be an idea to remove the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this change.
We use LOG_REQUESTS
to turn off django-log-outgoing-requests
completely in the same fashion as LOG_QUERIES
for example
|
Well this sounds like the configuration mistake on the client side. Probably they missed when we changed the default for LOG_REQUESTS to False (OZ 1.10.1) About removing the env var in favor of the admin configuration: |
Previously, setting the `LOG_REQUESTS` setting to `False` caused the runtime configuration of django-log-outgoing-requests to break. This was caused by no handlers being configured for its logger. As the runtime configuration at the moment only allows configuring saving to the database (or not) the `save_outgoing_requests` should always be configured in the `LOGGING` setting.
b00b29f
to
c2f3070
Compare
open_api_framework/conf/base.py
Outdated
SOLO_CACHE = config( | ||
"SOLO_CACHE", | ||
default="default", | ||
help_text=( | ||
"The cache which will be used by Django Solo. Can be set to an empty " | ||
"string to disable caching for Django Solo." | ||
), | ||
cast=lambda value: value if value else None, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@annashamray do we want this to be configurable? I don't see a use case for clients to want to disable this/use a different cache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with you, having the env var looks a little excessive, but I'm not strongly opposed to it. So it's up to you guys
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SonnyBA let's not make it an envvar and set it to "default"
then
@SonnyBA I'm not approving this PR, so if my previous review blocks you feel free to dismiss it |
See refinement at maykinmedia/objects-api#463
Partially fixes open-zaak/open-zaak#1784
Previously, setting the
LOG_REQUESTS
setting toFalse
caused the runtime configuration of django-log-outgoing-requests to break. This was caused by no handlers being configured for its logger.As the runtime configuration at the moment only allows configuring saving to the database (or not):
the
save_outgoing_requests
handler should always be included in the correspondingLOGGING
setting.Changes
Fixes the option to configure django-log-outgoing through the django admin.