The tracing
json subscriber gives the following stdout out of the box:
fn main() {
tracing_subscriber::fmt()
.json()
.with_max_level(tracing::Level::DEBUG)
.flatten_event(true)
.init();
tracing::debug!("This is a debug message");
}
{"timestamp":"2023-07-14T20:47:29.302872Z","level":"DEBUG","message":"This is a debug message","target":"publisher"}
How can I rename the field "level" to "severity"?
I tried to use the fmt::format::debug_fn
but it doesn't seem to be compatible.