fn file_internal(
        file: &str,
        overflow_strategy: OverflowStrategy,
        truncate: bool,
    ) -> Result<Self, Error> {
        // Logging to file
        let file = OpenOptions::new()
            .create(true)
            .write(true)
            .truncate(truncate)
            .open(file)?;
        let drain = Mutex::new(slog_json::Json::new(file).build()).map(slog::Fuse);
        let drain = slog_async::Async::new(drain)
            .overflow_strategy(overflow_strategy)
            .build()
            .fuse();
        Ok(ArgminSlogLogger {
            logger: slog::Logger::root(drain, o!()),
        })
    }
/// Actual implementaiton of logging JSON to file
Actual implementaiton of logging JSON to file
Actual implementaiton of logging JSON to file
fn file_internal(
        file: &str,
        overflow_strategy: OverflowStrategy,
        truncate: bool,
    ) -> Result<Self, Error> {
        // Logging to file
        let file = OpenOptions::new()
            .create(true)
            .write(true)
            .truncate(truncate)
            .open(file)?;
        let drain = Mutex::new(slog_json::Json::new(file).build()).map(slog::Fuse);
        let drain = slog_async::Async::new(drain)
            .overflow_strategy(overflow_strategy)
            .build()
            .fuse();
        Ok(ArgminSlogLogger {
            logger: slog::Logger::root(drain, o!()),
        })
    }
fn file_internal ( file : & str , overflow_strategy : OverflowStrategy , truncate : bool , ) -> Result < Self , Error > { // Logging to file let file = OpenOptions :: new ( ) . create ( true ) . write ( true ) . truncate ( truncate ) . open ( file ) ? ; let drain = Mutex :: new ( slog_json :: Json :: new ( file ) . build ( ) ) . map ( slog :: Fuse ) ; let drain = slog_async :: Async :: new ( drain ) . overflow_strategy ( overflow_strategy ) . build ( ) . fuse ( ) ; Ok ( ArgminSlogLogger { logger : slog :: Logger :: root ( drain , o ! ( ) ) , } ) }
Actual implementaiton of logging JSON to file
Actual implementaiton of logging JSON to file
file
&str
overflow_strategy
OverflowStrategy
truncate
bool