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

doesn't work with gevent #10

Closed mozillazg closed 7 years ago

mozillazg commented 8 years ago

If I am not mistaken, the threading.local is based on thread id to store data, but django + gunicorn + gevent may only one thread.

edevil commented 7 years ago

If you monkey patch the application, Gevent's threading.local will be used, in which case everything will work.

mozillazg commented 7 years ago

@edevil Thanks for your explanation!