Closed sshishov closed 4 months ago
I agree with the idea.
I was thinking of naming the setting app_settings.USER_ID_FIELD
instead.
Also, I'd like to support assigning None
to app_settings.USER_ID_FIELD
in order to completely disable the logging of the user_id
.
@sshishov please see #546
8.1.0 is out
Currently the
user_id
context variable is set frompk (primary_key)
, but some organizations are using different field, like UUID or similar to track their "public" identifiers.I would like to request to add the support to override
pk
field to anything else, set inside settings. In this case we do not need to override all signals in order to record proper user id.And for backward compatibility we can set the default value of the setting to
pk
.Proposal:
This is the follow up after https://github.com/jrobichaud/django-structlog/issues/80