Expand description
A highly efficient logging framework that targets resource-constrained devices, like microcontrollers.
Check out the defmt book at https://defmt.ferrous-systems.com for more information about how to use it.
§Compatibility
The defmt wire format might change between major versions. Attempting to read a defmt stream
with an incompatible version will result in an error. This means that you have to update both
the host and target side if a breaking change in defmt is released.
Macros§
- Just like the
core::assert!macro butdefmtis used to log the panic message - Just like the
core::assert_eq!macro butdefmtis used to log the panic message - Just like the
core::assert_ne!macro butdefmtis used to log the panic message - Generates a bitflags structure that can be formatted with defmt.
- Logs data at debug level.
- Just like the
core::debug_assert!macro butdefmtis used to log the panic message - Just like the
core::debug_assert_eq!macro butdefmtis used to log the panic message - Just like the
core::debug_assert_ne!macro butdefmtis used to log the panic message - Logs data at error level.
- Logs data at info level.
- Creates an interned string (
Str) from a string literal. - Just like the
core::panic!macro butdefmtis used to log the panic message - Always logs data irrespective of log level.
- Defines the global timestamp provider for defmt.
- Just like the
core::todo!macro butdefmtis used to log the panic message - Logs data at trace level.
- Just like the
core::unimplemented!macro butdefmtis used to log the panic message - Just like the
core::unreachable!macro butdefmtis used to log the panic message - Unwraps an
OptionorResult, panicking if it isNoneorErr. - Logs data at warn level.
- Writes formatted data to a
Formatter.
Structs§
- An “adapter” type to feed
Debugvalues into defmt macros, which expectdefmt::Formatvalues. - An “adapter” type to feed
Displayvalues into defmt macros, which expectdefmt::Formatvalues. - Encode raw defmt frames for sending over the wire.
- Handle to a defmt logger.
- An interned string created via
intern!.
Traits§
- Trait for types that can be formatted via defmt.
- Global logger acquire-release mechanism
Functions§
- Block until host has read all pending data.
Attribute Macros§
- Defines the global defmt logger.
- Overrides the panicking behavior of
defmt::panic!