Macro kernel::serial_trace::metadata
source ยท macro_rules! metadata { ( name: $name:expr, target: $target:expr, level: $level:expr, fields: $fields:expr, callsite: $callsite:expr, kind: $kind:expr ) => { ... }; ( name: $name:expr, target: $target:expr, level: $level:expr, fields: $fields:expr, callsite: $callsite:expr, kind: $kind:expr, ) => { ... }; }
Expand description
Statically constructs new span metadata.
/// For example:
use tracing_core::metadata;
use tracing_core::metadata::{Kind, Level, Metadata};
static FOO_CALLSITE: MyCallsite = MyCallsite {
// ...
};
static FOO_METADATA: Metadata = metadata!{
name: "foo",
target: module_path!(),
level: Level::DEBUG,
fields: &["bar", "baz"],
callsite: &FOO_CALLSITE,
kind: Kind::SPAN,
};