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

Method _proxy_to_logger

src/structlog/stdlib.py:269–286  ·  view source on GitHub ↗

Propagate a method call to the wrapped logger. This is the same as the superclass implementation, except that it also preserves positional arguments in the ``event_dict`` so that the stdlib's support for format strings can be used.

(
        self,
        method_name: str,
        event: str | None = None,
        *event_args: str,
        **event_kw: Any,
    )

Source from the content-addressed store, hash-verified

267 return self._proxy_to_logger(LEVEL_TO_NAME[level], event, *args, **kw)
268
269 def _proxy_to_logger(
270 self,
271 method_name: str,
272 event: str | None = None,
273 *event_args: str,
274 **event_kw: Any,
275 ) -> Any:
276 """
277 Propagate a method call to the wrapped logger.
278
279 This is the same as the superclass implementation, except that
280 it also preserves positional arguments in the ``event_dict`` so
281 that the stdlib's support for format strings can be used.
282 """
283 if event_args:
284 event_kw["positional_args"] = event_args
285
286 return super()._proxy_to_logger(method_name, event=event, **event_kw)
287
288 # Pass-through attributes and methods to mimic the stdlib's logger
289 # interface.

Callers 15

debugMethod · 0.95
infoMethod · 0.95
warningMethod · 0.95
errorMethod · 0.95
criticalMethod · 0.95
fatalMethod · 0.95
exceptionMethod · 0.95
logMethod · 0.95
msgMethod · 0.95
errMethod · 0.95
methFunction · 0.45
amethFunction · 0.45

Calls

no outgoing calls