Put keys and values into the thread-local context. Use this instead of :func:`~structlog.BoundLogger.bind` when you want some context to be global (thread-local). .. versionadded:: 19.2.0 .. deprecated:: 22.1.0
(**kw: Any)
| 297 | |
| 298 | |
| 299 | def bind_threadlocal(**kw: Any) -> None: |
| 300 | """ |
| 301 | Put keys and values into the thread-local context. |
| 302 | |
| 303 | Use this instead of :func:`~structlog.BoundLogger.bind` when you want some |
| 304 | context to be global (thread-local). |
| 305 | |
| 306 | .. versionadded:: 19.2.0 |
| 307 | .. deprecated:: 22.1.0 |
| 308 | """ |
| 309 | _deprecated() |
| 310 | _get_context().update(kw) |
| 311 | |
| 312 | |
| 313 | def unbind_threadlocal(*keys: str) -> None: |
searching dependent graphs…