Crate logforth_diagnostic_task_local

Crate logforth_diagnostic_task_local 

Source
Expand description

A diagnostic that stores key-value pairs in a task-local map.

§Examples

use logforth_core::Diagnostic;
use logforth_core::kv::Visitor;
use logforth_diagnostic_task_local::FutureExt;

let fut = async { log::info!("Hello, world!") };
fut.with_task_local_context([("key".into(), "value".into())]);

Structs§

TaskLocalDiagnostic
A diagnostic that stores key-value pairs in a task-local context.

Traits§

FutureExt
An extension trait for futures to run them with a task-local context.