Open einar-polygon opened 2 months ago
Let's also start using structured logging instead of string interpolation as we do this
I'll be handling this in parallel of the replacement of TimingTree
with tracing::instrument
on the plonky2 side
Robin, you might find this helpful: https://github.com/aatifsyed/synsert/blob/main/examples/tracing.rs
It takes string interpolated logs like info!("couldn't load block number {block_number}")
and creates structured logs like info!(%block_number, "couldn't load block number")
@Nashtare You should probably move zero/src/tracing.rs
to common/src/tracing.rs
so that we can easily manage tracing setup and initialization in one place.
Currently our project is using a mix of logging and tracing. Since tracing works as a drop-in replacement, so it shouldn't be too much work, and would provide benefits such as a more pleasant debugging experience.