Expand description
Logging facade.
With the defmt feature these are defmt’s own macros; without it they
expand to nothing so the stack builds without the logging dependency.
Macros§
- assert
- Just like the
core::assert!macro butdefmtis used to log the panic message - assert_
eq - Just like the
core::assert_eq!macro butdefmtis used to log the panic message - assert_
ne - Just like the
core::assert_ne!macro butdefmtis used to log the panic message - bitflags
- Generates a bitflags structure that can be formatted with defmt.
- dbg
- Just like the
std::dbg!macro butdefmtis used to log the message atTRACElevel. - debug
- Logs data at debug level.
- debug_
assert - Just like the
core::debug_assert!macro butdefmtis used to log the panic message - debug_
assert_ eq - Just like the
core::debug_assert_eq!macro butdefmtis used to log the panic message - debug_
assert_ ne - Just like the
core::debug_assert_ne!macro butdefmtis used to log the panic message - error
- Logs data at error level.
- expect
- Unwraps an
OptionorResult, panicking if it isNoneorErr. - info
- Logs data at info level.
- intern
- Creates an interned string (
Str) from a string literal. - panic
- Just like the
core::panic!macro butdefmtis used to log the panic message - println
- Always logs data irrespective of log level.
- timestamp
- Defines the global timestamp provider for defmt.
- todo
- Just like the
core::todo!macro butdefmtis used to log the panic message - trace
- Logs data at trace level.
- unimplemented
- Just like the
core::todo!macro butdefmtis used to log the panic message - unreachable
- Just like the
core::unreachable!macro butdefmtis used to log the panic message - unwrap
- Unwraps an
OptionorResult, panicking if it isNoneorErr. - warn
- Logs data at warn level.
- write
- Writes formatted data to a
Formatter.
Structs§
- Debug2
Format - An “adapter” type to feed
Debugvalues into defmt macros, which expectdefmt::Formatvalues. - Display2
Format - An “adapter” type to feed
Displayvalues into defmt macros, which expectdefmt::Formatvalues. - Encoder
- Encode raw defmt frames for sending over the wire.
- Formatter
- Handle to a defmt logger.
- Str
- An interned string created via
intern!.
Traits§
Functions§
- flush
- Block until host has read all pending data.
Attribute Macros§
- global_
logger - Defines the global defmt logger.
- panic_
handler - Overrides the panicking behavior of
defmt::panic!