[][src]Function sentry_core::capture_message

pub fn capture_message(msg: &str, level: Level) -> Uuid

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"));