tracing_forest/
fail.rs

1use crate::cfg_uuid;
2
3pub const SPAN_NOT_IN_CONTEXT: &str = "Span not in context, this is a bug";
4pub const OPENED_SPAN_NOT_IN_EXTENSIONS: &str =
5    "Span extension doesn't contain `OpenedSpan`, this is a bug";
6pub const PROCESSING_ERROR: &str = "Processing logs failed";
7
8cfg_uuid! {
9    pub const NO_CURRENT_SPAN: &str = "The subscriber isn't in any spans";
10    pub const NO_FOREST_LAYER: &str = "The span has no `Span` in extensions, perhaps you forgot to add a `ForestLayer` to your subscriber?";
11
12    #[cold]
13    #[inline(never)]
14    pub fn subscriber_not_found<'a, S>() -> &'a S {
15        panic!(
16            "Subscriber could not be downcasted to `{}`",
17            std::any::type_name::<S>()
18        );
19    }
20}