Skip to content

trace: support string interpolation #83

Open
@Ralith

Description

@Ralith

Log readability is significantly improved by interleaving information with text, rather than supplying a static string followed by a set of key-value pairs. tokio-trace's macros should support constructing such interpolated strings while preserving the interpolated data as structured fields.

Additionally, any out-of-the-box subscribers targeting direct human consumption (such as by printing to stdout) should not duplicate interpolated values in its output. This could be accomplished without compromising support for users that prefer not to use interpolation by using a distinct field name for message strings that include interpolated data, and establishing that human-oriented subscribers should only display unrecognized key-value pairs if an interpolated message field is not present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    crate/tracingRelated to the `tracing` cratehelp wantedExtra attention is neededkind/featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions