Skip to main content

try_init

Function try_init 

Source
pub fn try_init() -> Result<(), Box<dyn Error + Send + Sync>>
Expand description

Installs the tracing subscriber, returning an error if one is already set.

Use this in tests to avoid panics from double-initialization.

ยงErrors

Returns Err if a global subscriber has already been installed.