Attribute Macro default_transport

Source
#[default_transport]
Expand description

This macro provides a transport implementation for utrace.

To create custom transport, one should do the following:

#[utrace::default_transport]
fn transport(buf: &[u8]) {
   ...
}

Please note, that current implementation executes timestamp capture, serialization and sending in a single critical section, hence the transport function does not need to be reentrant.

Note, that during initialization you might want to call utrace::init(). While this is not mandatory, this will provide a trace stream receiver with a point to synchronize time and split traces related to different runs.