Skip to content

tracing appender custom writer and custom layer mutually exclusive? #1981

Answered by hawkw
cong-or asked this question in Q&A
Discussion options

You must be logged in to vote

Try

let (non_blocking, _guard) = tracing_appender::non_blocking(LogWriter);
tracing_subscriber::registry()
    .with(LogLayerGeneric { tx_channel: log_tx })
    .with(tracing_subscriber::fmt::layer().with_writer(non_blocking))
    .init();

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by cong-or
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