Crate log_args_runtime

Source

Macros§

add_context_fields
debug
error
info
Global context-aware logging macros that inherit parent context These can be used in any function to automatically include context from parent functions with span
log_with_context
trace
warn

Structs§

AsyncContextGuard
Guard for async context that automatically pops on drop

Functions§

auto_capture_context
Automatically capture and preserve current context for function execution This ensures context is maintained across function boundaries without user intervention
capture_context
Capture current context and store it globally for cross-boundary persistence This function is automatically called by the macro to ensure context is preserved
get_context_value
get_global_context
Get global context for cross-boundary persistence
get_inherited_context_string
Get inherited context as a formatted string for automatic span propagation This function retrieves all context fields from the current span context and formats them as a string for logging
get_inherited_fields_map
Get inherited context fields as individual key-value pairs This function returns a HashMap of inherited context fields for dynamic field injection
set_global_context
Set global context that persists across all boundaries
with_context_capture1
Helper function to capture context for closure boundaries This captures the current context and returns a closure that restores it Usage: let captured = with_context_capture1(|arg| { /* your code */ });
with_context_capture2
Helper function for automatic closure context capture with two arguments
with_context_capture3
Helper function for automatic closure context capture with three arguments