You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: format_layer.rs
    path of file: ./repos/rust-template/rust+wasm/{{project-name}}/src.axum/tracing_layers
    
    the code of the file until where you have to start completion: //! [Logfmt]'ed event logging [Layer] with augmented telemetry info.
//!
//! Inspired by [influxdata's (Influx DB's) version].
//!
//! [Logfmt]: <https://brandur.org/logfmt>
//! [Layer]: tracing_subscriber::Layer
//! [influxdata's (Influx DB's) version]: <https://github.com/influxdata/influxdb_iox/tree/main/logfmt>

use crate::tracing_layers::storage_layer::Storage;
use parking_lot::RwLock;
use std::{
    borrow::Cow,
    fmt,
    io::{self, Write},
    time::SystemTime,
};
use time::{format_description::well_known::Rfc3339, OffsetDateTime};
use tracing::{
    field::{Field, Visit},
    metadata::LevelFilter,
    span::{Attributes, Id},
    Event, Level, Subscriber,
};
use tracing_subscriber::{fmt::MakeWriter, layer::Context, registry::LookupSpan, Layer};

/// Fields to persist from [Storage](Storage) for `new_span` logs via context.
    
    fn on_new_span(&self, _attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>) {
        let mut p = self.printer.write();

        let metadata = ctx.metadata(id).expect("Span missing metadata");
        p.write_level(metadata.level());
        p.write_span_name(metadata.name());
        p.write_span_id(id);
        p.write_span_event("new_span");
        p.write_timestamp();

        let span = ctx.span(id).expect("Span not found");
        let extensions = span.extensions();
        if let Some(visitor) = extensions.get::<Storage<'_>>() {
            for (key, value) in visitor.values() {
                match *metadata.level() {
                    Level::TRACE | Level::DEBUG => p.write_kv(
                        decorate_field_name(translate_field_name(key)),
                        value.to_string(),
                    ),

                    _ => {
                        if SPAN_FIELDS.contains(key) {
                            p.write_kv(
                                decorate_field_name(translate_field_name(key)),
                                value.to_string(),
                            )
                        }
                    }
                }
            }
        }
        p.write_newline();
    }