macro_rules! logger_error {
($($arg:tt)+) => { ... };
}
Expand description
Captures a log at the error level, with the given message and attributes.
To attach attributes to a log, pass them with the key = value
syntax before the message.
The message can be a simple string or a format string with its arguments.
The supported attribute keys are all valid Rust identifiers with up to 8 dots. Using dots will nest multiple attributes under their common prefix in the UI.
The supported attribute values are simple types, such as string, numbers, and boolean.
ยงExamples
use sentry::logger_error;
// Simple message
logger_error!("Hello world");
// Message with format args
logger_error!("Value is {}", 42);
// Message with format args and attributes
logger_error!(
error_code = 500,
user.id = "12345",
user.email = "test@test.com",
success = false,
"Error occurred: {}",
"bad input"
);