Skip to main content

error

Macro error 

Source
macro_rules! error {
    ($module:expr, $($arg:tt)+) => { ... };
}
Expand description

Emits an error log entry through the global logging service.

Use this level for unexpected failures that affect a single request but do not crash the service: database query failures, storage write errors, or any condition that results in a 5xx response being returned to the client.

This macro is a complete no-op if the logger has not been initialized. See info! for parameter documentation and general behaviour.

§Usage

error!(Module::Database, "query failed: {}", e);