django-request-id icon indicating copy to clipboard operation
django-request-id copied to clipboard

X-Request-Id logging

Results 6 django-request-id issues
Sort by recently updated
recently updated
newest added

Updating the documentation to support recent NGINX versions and save implementers some time.

I implemented a custom logger which I am using in my Django project ``` import logging import sys def setup_custom_logger(name): logger = logging.getLogger(name) # logger.addFilter(reques_) formatter = logging.Formatter(fmt='%(asctime)s,%(msecs)d %(levelname)-3s [%(filename)s:%(lineno)d]...

``` class RequestIdFilter(logging.Filter): def filter(self, record): record.request_id = get_current_request_id() return True ``` local hit `release_local(local)` before reaching the filter so woulc not find request id in get_current_request_id

Is it possible? I tried `get_current_request_id()` inside a handler, but it returned nothing. I want to generate unique names for postgres server-side cursors. Request id would be optimal for that.

During testing I discovered Lua doesn't seed itself, resulting in the same request IDs showing in my logs. I've implemented seeding for Unix-like systems using `/dev/urandom`; Lots of pages on...