Function rocket_sentry_logger::init[][src]

pub fn init(dsn: String, config: Option<InitConfig>) -> Guard

Initialize a sentry client instance with the recommended sentry configuration & additional config which can be set with the InitConfig struct.

Returns a Sentry ClientInitGuard which will stop the logging service when dropped

Panics!

Panics if the sentry instance is not enabled after the init is done. That can happens due to an invalid dns.

 fn main() {
     logger::init(None);
 }