diagnostics_log

Function initialize_sync

Source
pub fn initialize_sync(opts: PublishOptions<'_>) -> impl Drop
Expand description

Initializes logging with the given options.

This must be used when working in an environment where a [fuchsia_async::Executor] can’t be used.

IMPORTANT: this should be called at most once in a program, and must be called only after an async executor has been set for the current thread, otherwise it’ll return errors or panic. Therefore it’s recommended to never call this from libraries and only do it from binaries.