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

Method alog

src/structlog/stdlib.py:534–542  ·  view source on GitHub ↗

Log using `log()`, but asynchronously in a separate thread. .. versionadded:: 23.1.0

(
        self, level: Any, event: str, *args: Any, **kw: Any
    )

Source from the content-addressed store, hash-verified

532 await self._dispatch_to_sync(self.exception, event, args, kw)
533
534 async def alog(
535 self, level: Any, event: str, *args: Any, **kw: Any
536 ) -> None:
537 """
538 Log using `log()`, but asynchronously in a separate thread.
539
540 .. versionadded:: 23.1.0
541 """
542 await self._dispatch_to_sync(partial(self.log, level), event, args, kw)
543
544
545def get_logger(*args: Any, **initial_values: Any) -> BoundLogger:

Callers 8

test_alogMethod · 0.45
test_alog_exact_levelMethod · 0.45
test_alog_one_belowMethod · 0.45
test_alog_no_argsMethod · 0.45
test_alog_interpMethod · 0.45
test_alog_interp_dictMethod · 0.45
typecheck_stdlib_asyncFunction · 0.45

Calls 1

_dispatch_to_syncMethod · 0.95

Tested by 6

test_alogMethod · 0.36
test_alog_exact_levelMethod · 0.36
test_alog_one_belowMethod · 0.36
test_alog_no_argsMethod · 0.36
test_alog_interpMethod · 0.36
test_alog_interp_dictMethod · 0.36