Skip to content

When creating my own FormatEvent type, I have to duplicate a lot of code #1039

@cecton

Description

@cecton

Feature Request

Crates

tracing-subscriber

Motivation

I'm trying to customize the log lines in the terminal. For that I need to write my own FormatEvent.

I copy-pasted the code of the one provided by tracing-subsriber called Format. But I had to duplicate a lot of other objects before being able to make it useful: FmtLevel, FmtThreadName, FmtCtx, even format::time::write()

Example here

Proposal

Not sure. Maybe make some common things pub?

Alternatives

Not sure either.

cc @davidbarsky

Metadata

Metadata

Assignees

No one assigned

    Labels

    crate/subscriberRelated to the `tracing-subscriber` crateneeds/designAdditional design discussion is required.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions