vibe.decorators¶
Decorator utilities for VIBE.
bind_args_to_logger ¶
bind_args_to_logger(**bindings_map: str) -> Callable[[Callable[P, R]], Callable[P, R]]
Bind specified arguments of the decorated function to structlog's contextvars.
| Parameters: |
|
|---|
Example
@bind_args_to_logger(template="template_id", version="version_id", state="literal state") def my_function(template_id, version_id, other_arg): # Will have template bound to template_id and state bound to "literal state". log.info("Processing")