dabapps / django-log-request-id

Django middleware and log filter to attach a unique ID to every log message generated as part of a request
BSD 2-Clause "Simplified" License
371 stars 64 forks source link

Documentation does not specify where to define options/config settings? #42

Closed john-mcgowan1992 closed 4 years ago

john-mcgowan1992 commented 4 years ago

For example, regarding the auto-generation of a request id if there is none found in the headers the documentation says the following:

If you wish to fall back to a generated ID when you have the LOG_REQUEST_ID_HEADER set but it was not provided in the request, add the following setting: GENERATE_REQUEST_ID_IF_NOT_IN_HEADER = True

Where should these variables be defined? Are they to be set in settings.py? I've tried adding them there, for both the GENERATE_REQUEST_ID_IF_NOT_IN_HEADER option and the NO_REQUEST_ID option, but they do not seem to be working. Any help would be appreciated

RealOrangeOne commented 4 years ago

They should indeed be set in your settings.py, in the root of the settings rather than as part of a config object.

If you're having issues with the settings not working for you, please open an issue with as much relevant context as possible in how you've got things setup, what you're seeing and what you'd expect to see.