Open davidiw opened 4 years ago
Why? We've just changed to crossbeam
cuz it's better.
In our attempt to minimize our dependencies :). I'm curious to learn more from your perspective.
Wouldn't you just go without slog-async altogether? I mean, if you're minimizing dependencies for some particular reason, then having asynchronous logging might be something you could live without and log synchronously. If you really need async logging, you're probably already writing something „big“ and the chance something else will pull crossbeam-channel is quite high IMO.
I guess it would be possible to have crossbeam as a feature flag, though. It would complicate the code a little bit (they don't have the exact same interface), but should be technically possible. No idea if it's worth it.
At some point crossbeam-channel
will maybe become std::sync::mpsc
, and we can switch back.
AFAIK crossbeam-channel
is considerably better in terms of performance, and if anyone is using slog-async
, I think that what they primary want (otherwise why bother with async at all).
Thanks for slog
modular nature, there's really nothing stopping anyone from copy pasting slog-async
source code into their own code and switching the queue too. Totally feasible: it's simple and tiny.
On a related note, according to cargo-audit, crossbeam-channel
version 0.5.3 has been yanked
We're exploring options in the logging space. I was curious how amenable you folks would be to using std::sync::mpsc::sync_channel in favor of crossbeam?