Sentry Rust SDK: sentry-slog
Sentry slog
Integration.
This mainly provides the [SentryDrain
], which wraps another [slog::Drain
]
and can be configured to forward [slog::Record
]s to Sentry.
The [SentryDrain
] can be used to create a slog::Logger
.
The integration also supports [slog::KV
] pairs. They will be added to the
breadcrumb data
or the event extra
properties respectively.
Examples
use SentryDrain;
let _sentry = init;
let drain = new;
let root = root;
info!;
warn!;
let breadcrumb = &captured_event.breadcrumbs.as_ref;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
crit!;
assert_eq!;
The Drain can also be customized with a filter
, and a mapper
:
use ;
let drain = new
.filter
.mapper;
When a mapper
is specified, a corresponding filter
should also be
provided.
Resources
License: Apache-2.0
- Discord server for project discussions.
- Follow @getsentry on Twitter for updates