pub fn error_with(message: &str, data: impl Into<Value>)
Expand description
Logs a message at the ERROR
level with additional structured metadata.
This function is intended for errors that should be captured in monitoring pipelines with relevant context, such as error codes or service names. A UTC timestamp is automatically injected.
ยงExample
use tincre_logger::logger;
use serde_json::json;
logger::error_with("Database write failed", json!({ "table": "users", "code": 500 }));