pub fn init_with_level<P: AsRef<Path>>(
    log_file: P, level: log::Level) -> Result<(), log::SetLoggerError> {
    
    let logger = FileLogger::new(log_file, level);
    log::set_boxed_logger(Box::new(logger))?;
    log::set_max_level(level.to_level_filter());

    Ok(())
}
/// Initialize a file logger with the specified logging level.
Initialize a file logger with the specified logging level.
Initialize a file logger with the specified logging level .
pub fn init_with_level<P: AsRef<Path>>(
    log_file: P, level: log::Level) -> Result<(), log::SetLoggerError> {
    let logger = FileLogger::new(log_file, level);
    log::set_boxed_logger(Box::new(logger))?;
    log::set_max_level(level.to_level_filter());
    Ok(())
}
pub fn init_with_level < P : AsRef < Path > > ( log_file : P , level : log :: Level ) -> Result < ( ) , log :: SetLoggerError > { let logger = FileLogger :: new ( log_file , level ) ; log :: set_boxed_logger ( Box :: new ( logger ) ) ? ; log :: set_max_level ( level . to_level_filter ( ) ) ; Ok ( ( ) ) }
Initialize a file logger with the specified logging level.
Initialize a file logger with the specified logging level .
log_file
P
level
log::Level