init_simple

Functionin log_fastlylog-fastly 0.13.1View source
fn init_simple<E>(endpoint: E, level: LevelFilter)
where
E: TryInto<Endpoint>,
E::Error: Into<Error>,

Initialize logging with a single endpoint filtered by log level.

For advanced configuration, see the Builder type, and the module-level documentation.

log_fastly::init_simple("my_endpoint", log::LevelFilter::Warn);
log::warn!("This will be written to my_endpoint...");
log::info!("...but this won't");

Parameters

endpoint: E
level: log::LevelFilter