Skip to main content

logcall

Attribute Macro logcall 

Source
#[logcall]
Expand description

Logs function inputs and return values through the log facade.

The generated log message includes the function path, input values, and return value by default. Generated input and output formatting uses Debug.

Supported forms:

  • #[logcall] logs at debug.
  • #[logcall("info")] logs at a fixed level.
  • #[logcall(ok = "info", err = "error")] logs Result variants separately.
  • #[logcall(some = "info", none = "warn")] logs Option variants separately.
  • #[logcall(input = "...", output = "...")] customizes message formatting.

See the crate-level documentation for runnable examples.