tokio-rs / tracing

Application level tracing for Rust.
https://tracing.rs
MIT License
5.19k stars 677 forks source link

macros: Fix missing field prefixes #2878

Closed Turbo87 closed 5 months ago

Turbo87 commented 5 months ago

Motivation

In the simple macro cases with e.g. only "name" or only "target" these prefixes exist, but for the more complicated cases like "name + target" the prefixes were not piped through and silently ignored. This led to the compiler complaining about Value not being implemented despite the usage of the ? or % prefixes:

Bildschirmfoto 2024-02-14 um 12 38 00

Solution

This change adds the missing prefixes to the $($k) tokens, like they already exist for the simple cases mentioned above.