Skip to main content

error

Macro error 

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

Log an error message as a Copper structured log entry.

Accepted forms:

  • error!("message {}", value)
  • error!(ctx, "message {}", value)

Passing a CuContext as the first argument records the current culistid, component_id, and task_index (when present) on the structured log entry. The message argument must be a string literal, and remaining arguments may be unnamed expressions or named fields written as name = value.

This macro will be compiled out if the max log level is set to a level higher than Error.