Skip to main content

warning

Macro warning 

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

Log a warning message as a Copper structured log entry.

Accepted forms:

  • warning!("message {}", value)
  • warning!(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 Warning.