pub fn init(self) -> Result<(), SetLoggerError> {
        let loggers: Vec<Logger> = self
            .filters
            .iter()
            .map(|filter| {
                Logger::builder()
                    .appender(APPENDER_NAME)
                    .build(filter.module(), filter.level())
            })
            .collect();

        let config = Config::builder()
            .appender(Appender::builder().build(APPENDER_NAME, Box::new(GodotAppender)))
            .loggers(loggers)
            .build(
                Root::builder()
                    .appender(APPENDER_NAME)
                    .build(self.default_log_level.to_level_filter()),
            )
            .unwrap();

        let _handle = log4rs::init_config(config)?;
        Ok(())
    }
/// Initializes the logger
///
/// This method consumes the builder and initializes the logger with the current configuration
/// of the builder. After calling this method, log records will be written to Godot's output
/// console.
///
/// # Examples
///
/// ```
/// use log::Level;
/// use godot_logger::GodotLogger;
///
/// GodotLogger::builder().init();
/// ```
Initializes the logger
This method consumes the builder and initializes the logger with the current configuration
of the builder. After calling this method, log records will be written to Godot's output
console.
Initializes the logger This method consumes the builder and initializes the logger with the current configuration of the builder . After calling this method log records will be written to Godot ' s output console .
pub fn init(self) -> Result<(), SetLoggerError> {
        let loggers: Vec<Logger> = self
            .filters
            .iter()
            .map(|filter| {
                Logger::builder()
                    .appender(APPENDER_NAME)
                    .build(filter.module(), filter.level())
            })
            .collect();
        let config = Config::builder()
            .appender(Appender::builder().build(APPENDER_NAME, Box::new(GodotAppender)))
            .loggers(loggers)
            .build(
                Root::builder()
                    .appender(APPENDER_NAME)
                    .build(self.default_log_level.to_level_filter()),
            )
            .unwrap();
        let _handle = log4rs::init_config(config)?;
        Ok(())
    }
pub fn init ( self ) -> Result < ( ) , SetLoggerError > { let loggers : Vec < Logger > = self . filters . iter ( ) . map ( | filter | { Logger :: builder ( ) . appender ( APPENDER_NAME ) . build ( filter . module ( ) , filter . level ( ) ) } ) . collect ( ) ; let config = Config :: builder ( ) . appender ( Appender :: builder ( ) . build ( APPENDER_NAME , Box :: new ( GodotAppender ) ) ) . loggers ( loggers ) . build ( Root :: builder ( ) . appender ( APPENDER_NAME ) . build ( self . default_log_level . to_level_filter ( ) ) , ) . unwrap ( ) ; let _handle = log4rs :: init_config ( config ) ? ; Ok ( ( ) ) }
Initializes the logger
This method consumes the builder and initializes the logger with the current configuration
of the builder.
Initializes the logger This method consumes the builder and initializes the logger with the current configuration of the builder .
self
self
examples
```
use log::Level;
use godot_logger::GodotLogger.


` ` ` use log :: Level ; use godot_logger :: GodotLogger .