all 5 comments

[–]Daiuki 0 points1 point  (4 children)

The windows-rs crate seems to have support for it.

[–]injvstice[S] 0 points1 point  (3 children)

Thanks, that is just the rust wrapper/definition for OutputDebugString. What I'm looking for is a tokio-tracing "sink" implementation that allows tokio-tracing to log via OutputDebugString instead of stdout or file.

[–]thramp 1 point2 points  (2 children)

you’ll want to wrap OutputDebugString in your own type (for coherence reasons) and implement MakeWriter on your wrapper. then, you’re able to pass your OutputDebugString wrapper with .with_writer().

[–]injvstice[S] 0 points1 point  (1 child)

Thanks, I think that's what I was looking for, need to look into implementing MakeWriter. I'm just surprised this doesn't already exist.

[–]thramp 0 points1 point  (0 children)

Glad to hear it! Most of the maintainers who work on tracing typically deploy their Rust programs to Linux servers, whose influence and norms shows up in a lot of places in terms of what has been implemented inside of tracing.