Function sentry_core::capture_message

source ·
pub fn capture_message(msg: &str, level: Level) -> Uuid
Expand description

Captures an arbitrary message.

This creates an event from the given message and sends it via capture_event.

§Examples

use sentry::protocol::Level;

sentry::capture_message("some message", Level::Info);

assert_eq!(captured_event.message.as_deref(), Some("some message"));