Pretty Print Rust tracing Log Output

rust

```cargo
[dependencies]
tracing = "0.1"
tracing-subscriber = "0.3"
```

use tracing::{Level, event, instrument};

#[instrument]
fn main() {
    let format = tracing_subscriber::fmt::format().pretty();
    tracing_subscriber::fmt()
      .event_format(format)
      .with_ansi(false)
      .with_max_level(Level::DEBUG)
      .init();
  event!(Level::INFO, "This is an info message");
  event!(Level::DEBUG, "This is a debug message");
}
            
2024-04-23T14:39:34.254964Z  INFO _active_nvim_run: This is an info message
    at /Users/alan/.cargo/target/55/19854259915251/_active_nvim_run:17

  2024-04-23T14:39:34.255026Z DEBUG _active_nvim_run: This is a debug message
    at /Users/alan/.cargo/target/55/19854259915251/_active_nvim_run:18
        

This is how I'm pretty printing multi-line log messages in Rust with the {# type: standard #} {%- import "includes/theme-macros.neojinja" as theme -%} {% for span in span.content.spans %} {{- theme.output_spans(site, page_id, span) -}} {% endfor %} and {# type: standard #} {%- import "includes/theme-macros.neojinja" as theme -%} {% for span in span.content.spans %} {{- theme.output_spans(site, page_id, span) -}} {% endfor %} crates

References