[−][src]Macro emit::emit
Emit an event to the ambient pipeline.
Examples
The event below collects a user
property and is emitted if the pipeline level includes
LogLevel::Info
.
ⓘThis example is not tested
emit!(emit::LogLevel::Info, "Hello, {}!", user: env::var("USERNAME").unwrap());
A target
expression may be specified if required. When omitted the target
property
will carry the current module name.
ⓘThis example is not tested
emit!(target: "greetings", emit::LogLevel::Info, "Hello, {}!", user: env::var("USERNAME").unwrap());