demultiplexer pattern? #1961
-
is it possible to collect logs and distribute the data to different sinks? For example, pipe data to ** in regards to custom endpoint, is it possible to write custom logic to send over the wire etc? ** |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes. I'd look at this example: https://github.com/tokio-rs/tracing/blob/v0.1.x/examples/examples/fmt-multiple-writers.rs.
Yes. The common approach is to implement your own Layer. The layers in tracing-subscriber are somewhat complex to learn from, but the formatting logic inside of https://github.com/davidbarsky/tracing-tree aside, it could be a good starting point to understand what a simpler layer can look like. |
Beta Was this translation helpful? Give feedback.
Yes. I'd look at this example: https://github.com/tokio-rs/tracing/blob/v0.1.x/examples/examples/fmt-multiple-writers.rs.
Yes. The common approach is to implement your own Layer. The layers in tracing-subscriber are somewhat complex to learn from, but the formatting logic inside of https://github.com/davidbarsky/tracing-tree aside, it could be a good starting point to understand what a simpler layer can look like.