Sentry Rust SDK: sentry-log
Adds support for automatic Breadcrumb and Event capturing from logs.
The log
crate is supported in two ways. First, logs can be captured as
breadcrumbs for later. Secondly, error logs can be captured as events to
Sentry. By default anything above Info
is recorded as a breadcrumb and
anything above Error
is captured as error event.
Examples
let mut log_builder = formatted_builder;
log_builder.parse_filters;
let logger = with_dest;
set_boxed_logger.unwrap;
set_max_level;
let _sentry = init;
info!;
error!;
Or one might also set an explicit filter, to customize how to treat log records:
use LogFilter;
let logger = new.filter;
Resources
License: Apache-2.0
- Discord server for project discussions.
- Follow @getsentry on Twitter for updates