[−][src]Module sentry::integrations::env_logger
Adds support for automatic breadcrumb capturing from logs with env_logger
.
Feature: with_env_logger
(enabled by default)
Configuration
In the most trivial version you call this crate's init function instead of the one
from env_logger
and pass None
as logger:
sentry::integrations::env_logger::init(None, Default::default());
This parses the default RUST_LOG
environment variable and configures both env_logger
and this crate appropriately. If you want to create your own logger you can forward it
accordingly:
let mut log_builder = pretty_env_logger::formatted_builder(); log_builder.parse("info,foo=debug"); sentry::integrations::env_logger::init(Some(log_builder.build()), Default::default());
Functions
init | Initializes the environment logger. |