pub(crate) fn init(options: &LoggerOptions) {
    let level_name = &options.level;
    let color = options.color;

    let level = get_level(level_name);

    let log_level = match level {
        LogLevel::VERBOSE => LevelFilter::Debug,
        LogLevel::INFO => LevelFilter::Info,
        LogLevel::ERROR => LevelFilter::Error,
        LogLevel::OFF => LevelFilter::Off,
    };
    let level_name_value = get_name_for_filter(&log_level);

    envmnt::set("CARGO_MAKE_LOG_LEVEL", &level_name_value);
    envmnt::set_bool("CARGO_MAKE_DISABLE_COLOR", !color);

    let recursion_lvl = recursion_level::get();
    let recursion_level_log = if recursion_lvl == 0 {
        "".to_string()
    } else {
        format!("[{}]", recursion_lvl)
    };

    let name_fmt = get_formatted_name(&options.name, color);

    let result = fern::Dispatch::new()
        .format(move |out, message, record| {
            let record_level = record.level();

            if cfg!(test) {
                if record_level == LevelFilter::Error {
                    panic!("test error flow: {}", message);
                }
            }

            let record_level_fmt = get_formatted_log_level(&record_level, color);

            out.finish(format_args!(
                "[{}]{} {} - {}",
                &name_fmt, &recursion_level_log, &record_level_fmt, &message
            ));

            if record_level == Level::Error {
                warn!("Build Failed.");

                exit(1);
            }
        })
        .level(log_level)
        .chain(stdout())
        .apply();

    if result.is_err() {
        println!("Unable to setup logger.");
    }
}
Initializes the global logger.

# Arguments

* `level_name` - The log level name ('verbose', 'info', 'error', 'off')
src/lib/logger.rs