Function bevy::log::tracing_subscriber::fmt::layer

source ยท
pub fn layer<S>() -> Layer<S>
Available on crate features fmt and std only.
Expand description

Returns a new formatting layer that can be composed with other layers to construct a Subscriber.

This is a shorthand for the equivalent Layer::default() function.

Examples found in repository?
examples/app/log_layers.rs (line 26)
23
24
25
26
27
28
29
30
31
fn custom_layer(_app: &mut App) -> Option<BoxedLayer> {
    // You can provide multiple layers like this, since Vec<Layer> is also a layer:
    Some(Box::new(vec![
        bevy::log::tracing_subscriber::fmt::layer()
            .with_file(true)
            .boxed(),
        CustomLayer.boxed(),
    ]))
}