pub fn init(self) -> Result<Handle, Error> {
        if self.filter.trim().eq_ignore_ascii_case("off") {
            return Ok(Handle {
                level: None,

                // logging is disabled, but log streaming might still be enabled later
                #[cfg(feature = "stream")]
                stream: {
                    let (handle, layer) = stream::StreamHandle::new();
                    tracing::dispatcher::set_global_default(
                        tracing_subscriber::registry().with(None).with(layer).into(),
                    )?;
                    handle
                },
            });
        }

        let (dispatch, handle) = self.build();
        // Set the default subscriber.
        tracing::dispatcher::set_global_default(dispatch)?;

        // Set up log compatibility.
        init_log_compat()?;

        Ok(handle)
    }
/// Initialize tracing and logging with the value of the `ENV_LOG`
/// environment variable as the verbosity-level filter.
Initialize tracing and logging with the value of the `ENV_LOG`
environment variable as the verbosity-level filter.
Initialize tracing and logging with the value of the ` ENV_LOG ` environment variable as the verbosity - level filter .
pub fn init(self) -> Result<Handle, Error> {
        if self.filter.trim().eq_ignore_ascii_case("off") {
            return Ok(Handle {
                level: None,
                // logging is disabled, but log streaming might still be enabled later
                #[cfg(feature = "stream")]
                stream: {
                    let (handle, layer) = stream::StreamHandle::new();
                    tracing::dispatcher::set_global_default(
                        tracing_subscriber::registry().with(None).with(layer).into(),
                    )?;
                    handle
                },
            });
        }
        let (dispatch, handle) = self.build();
        // Set the default subscriber.
        tracing::dispatcher::set_global_default(dispatch)?;
        // Set up log compatibility.
        init_log_compat()?;
        Ok(handle)
    }
pub fn init ( self ) -> Result < Handle , Error > { if self . filter . trim ( ) . eq_ignore_ascii_case ( " " ) { return Ok ( Handle { level : None , // logging is disabled, but log streaming might still be enabled later # [ cfg ( feature " " ) ] stream : { let ( handle , layer ) = stream :: StreamHandle :: new ( ) ; tracing :: dispatcher :: set_global_default ( tracing_subscriber :: registry ( ) . with ( None ) . with ( layer ) . into ( ) , ) ? ; handle } , } ) ; } let ( dispatch , handle ) = self . build ( ) ; // Set the default subscriber. tracing :: dispatcher :: set_global_default ( dispatch ) ? ; // Set up log compatibility. init_log_compat ( ) ? ; Ok ( handle ) }
Initialize tracing and logging with the value of the `ENV_LOG`
environment variable as the verbosity-level filter.
Initialize tracing and logging with the value of the ` ENV_LOG ` environment variable as the verbosity - level filter .
self