Closed birdsarah closed 2 years ago
To use this upgraded code on our local codebase, we needed to make one change:
pub fn init_tracing<Sink>(service_name: &str, log_level: &str, sink: Sink)
where
- Sink: for<'a> MakeWriter + Send + Sync + 'static,
+ Sink: for<'a> MakeWriter<'a> + Send + Sync + 'static,
{
let env_filter = EnvFilter::new(log_level);
For context on motivation.
chrono is unmaintained and has a security vulnerability with no fix. Downstream dependencies have updated themselves to move off chrono.
The use of chrono in this crate is very limited (just creating a timestamp) which
timestd::SystemTime
can easily handle.So this PR switches chrono to
std::SystemTime
for this crate and bumps the dependency versions so that chrono isn't in the dependency chain.Thanks for the assist @pjenvey