Skip to content

Using tracing/tracing_subscriber in build scripts #3213

Answered by hawkw
liss-h asked this question in Q&A
Discussion options

You must be logged in to vote

I don't know of any existing implementation of something that does this, but it definitely sounds like it would be useful! If you're interested in writing a crate for this, we'd love to add it in the list of tracing ecosystem crates in the documentation.

If I was going to write an implementation of this, I would probably consider using the MakeWriter::make_writer_for method in a tracing_subscriber::fmt::MakeWriter implementation. That method is designed to allow a MakeWriter implementation to return different I/O writers based on an event's Metadata (including its level), so it can be used for sending different levels to different outputs. If you implemented a BuildScriptWriter or somethi…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@liss-h
Comment options

Answer selected by liss-h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants