You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After comparing log, slog, and tracing, it seems like tracing might have an interface as simple as log but be slightly more future-forward.
The tracing_subscriber json feature seems like a good place to start: structured logging as JSONL
One thing to figure out: for the libraries that rely on log, is there a way to still log them without needing to run env_logger::init() in addition to whatever tracing init I do?
Start by adding tracing to the snapshots code, which has pretty gnarly printlns
It seems like I start here
let filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info"));
tracing_subscriber::fmt()
.with_writer(file) // Optional
.with_env_filter(filter)
.with_max_level(Level::TRACE)
.init();
let work_span = span!(Level::TRACE, "work", task = "processing data");
let _enter = work_span.enter();
debug!("yak shaved successfully", user = "marcua");
The text was updated successfully, but these errors were encountered:
* Remove not-yet-used InstantiatedSnapshot
* Move snapshot execution/scheduling out of root of snapshots module and into a submodule
* Standardize an error
* Turn TODO into an issue: #425
* Remove dependence on WalkDir; cargo fmt
* Clippy
* More Clippy
log
,slog
, andtracing
, it seems liketracing
might have an interface as simple aslog
but be slightly more future-forward.tracing_subscriber
json feature seems like a good place to start: structured logging as JSONLlog
, is there a way to still log them without needing to run env_logger::init() in addition to whatever tracing init I do?snapshots
code, which has pretty gnarly printlnsIt seems like I start here
The text was updated successfully, but these errors were encountered: