itamarst / eliot

Eliot: the logging system that tells you *why* it happened
https://eliot.readthedocs.io
Apache License 2.0
1.1k stars 66 forks source link

Current mechanism for sub-contexts is buggy and hard to extend #388

Closed itamarst closed 5 years ago

itamarst commented 5 years ago

Currently we support asyncio sub-contexts to the thread-local context. But there's a bug: it only enables e.g. asyncio contexts in the current thread if you call use_asyncio_context().

Additionally, we want to support a different kind of sub-context, for Twisted's inlineCallbacks. There's no good way to support both, or even to make sure only one gets registered.