Skip to main content

log

Macro log 

Source
log!() { /* proc-macro */ }
Expand description

Companion log! macro.

The macro automates the creation of a Logger object to log a message. It support a limited subset of the format! syntax. The macro parses the format string at compile time and generates the calls to a Logger object to generate the corresponding formatted message.

ยงArguments

  • crate_path: The path to the crate where the Logger struct is defined. This is an optional argument.
  • buffer_len: The length of the buffer to use for the logger (default to 200). This is an optional argument.
  • format_string: The literal string to log. This string can contain placeholders {} to be replaced by the arguments.
  • args: The arguments to replace the placeholders in the format string. The arguments must implement the Log trait.