MCPcopy Create free account
hub / github.com/hynek/structlog / new

Method new

src/structlog/stdlib.py:202–210  ·  view source on GitHub ↗

Clear context and binds *initial_values* using `bind`. Only necessary with dict implementations that keep global state like those wrapped by `structlog.threadlocal.wrap_dict` when threads are reused.

(self, **new_values: Any)

Source from the content-addressed store, hash-verified

200 return super().try_unbind(*keys)
201
202 def new(self, **new_values: Any) -> Self:
203 """
204 Clear context and binds *initial_values* using `bind`.
205
206 Only necessary with dict implementations that keep global state like
207 those wrapped by `structlog.threadlocal.wrap_dict` when threads
208 are reused.
209 """
210 return super().new(**new_values)
211
212 def debug(self, event: str | None = None, *args: Any, **kw: Any) -> Any:
213 """

Callers 10

newMethod · 0.45
test_proxies_newMethod · 0.45
test_bind_unbindMethod · 0.45
test_empty_processorsMethod · 0.45
test_new_clears_stateMethod · 0.45
test_new_keeps_classMethod · 0.45

Calls

no outgoing calls

Tested by 7

test_proxies_newMethod · 0.36
test_bind_unbindMethod · 0.36
test_empty_processorsMethod · 0.36
test_new_clears_stateMethod · 0.36
test_new_keeps_classMethod · 0.36