pub fn init() {
    let default_filter = if cli::manager::is_verbose() {
        "debug"
    } else {
        "info"
    };
    env_logger::Builder::from_env(env_logger::Env::default().default_filter_or(default_filter))
        .format(|buf, record| {
            let mut style = buf.style();
            let level = colored_level(&mut style, record.level());
            let mut style = buf.style();
            let message = style.set_bold(true).value(record.args());
            writeln!(
                buf,
                "{} {} {}:{}: {}",
                level,
                chrono::Local::now().format("%H:%M:%S.%3f"),
                record.file().unwrap_or("unknown"),
                record.line().unwrap_or(0),
                message,
            )
        })
        .init();

    info!(
        "{}, version: {}-{}, build date: {}",
        env!("CARGO_PKG_NAME"),
        env!("CARGO_PKG_VERSION"),
        env!("VERGEN_GIT_SHA_SHORT"),
        env!("VERGEN_BUILD_DATE")
    );
    info!(
        "Starting at {}",
        chrono::Local::now().format("%Y-%m-%dT%H:%M:%S"),
    );
    debug!("Command line call: {}", cli::manager::command_line_string());
    debug!(
        "Command line input struct call: {:#?}",
        cli::manager::matches().args
    );
}
// Start logger, should be done inside main
Start logger, should be done inside main
Start logger should be done inside main
pub fn init() {
    let default_filter = if cli::manager::is_verbose() {
        "debug"
    } else {
        "info"
    };
    env_logger::Builder::from_env(env_logger::Env::default().default_filter_or(default_filter))
        .format(|buf, record| {
            let mut style = buf.style();
            let level = colored_level(&mut style, record.level());
            let mut style = buf.style();
            let message = style.set_bold(true).value(record.args());
            writeln!(
                buf,
                "{} {} {}:{}: {}",
                level,
                chrono::Local::now().format("%H:%M:%S.%3f"),
                record.file().unwrap_or("unknown"),
                record.line().unwrap_or(0),
                message,
            )
        })
        .init();
    info!(
        "{}, version: {}-{}, build date: {}",
        env!("CARGO_PKG_NAME"),
        env!("CARGO_PKG_VERSION"),
        env!("VERGEN_GIT_SHA_SHORT"),
        env!("VERGEN_BUILD_DATE")
    );
    info!(
        "Starting at {}",
        chrono::Local::now().format("%Y-%m-%dT%H:%M:%S"),
    );
    debug!("Command line call: {}", cli::manager::command_line_string());
    debug!(
        "Command line input struct call: {:#?}",
        cli::manager::matches().args
    );
}
pub fn init ( ) { let default_filter = if cli :: manager :: is_verbose ( ) { " " } else { " " } ; env_logger :: Builder :: from_env ( env_logger :: Env :: default ( ) . default_filter_or ( default_filter ) ) . format ( | buf , record | { let mut style = buf . style ( ) ; let level = colored_level ( & mut style , record . level ( ) ) ; let mut style = buf . style ( ) ; let message = style . set_bold ( true ) . value ( record . args ( ) ) ; writeln ! ( buf " " level chrono Local now ( ) format ( " " ) record file ( ) unwrap_or ( " " ) record line ( ) unwrap_or ( 0 ) message ) } ) . init ( ) ; info ! ( " " env ( " " ) env ( " " ) env ( " " ) env ( " " ) ) ; info ! ( " " chrono Local now ( ) format ( " " ) ) ; debug ! ( " " cli manager command_line_string ( ) ) ; debug ! ( " " cli manager matches ( ) args ) ; }
Start logger, should be done inside main
Start logger should be done inside main