pub fn set_log_level(level: WeldLogLevel) {
    use crate::util::colors::Color::*;
    use crate::util::colors::*;

    let filter: log::LogLevelFilter = level.into();
    let format = |rec: &log::LogRecord<'_>| {
        let prefix = match rec.level() {
            log::LogLevel::Error => format_color(Red, "error"),
            log::LogLevel::Warn => format_color(Yellow, "warn"),
            log::LogLevel::Info => format_color(Yellow, "info"),
            log::LogLevel::Debug => format_color(Green, "debug"),
            log::LogLevel::Trace => format_color(Green, "trace"),
        };
        let date = chrono::Local::now().format("%T%.3f");
        format!("[{}] {}: {}", prefix, date, rec.args())
    };

    let mut builder = env_logger::LogBuilder::new();
    builder.format(format);
    builder.filter(None, filter);
    builder.init().unwrap_or(());

    info!(
        "Weld Version {} (Build {})",
        VERSION.unwrap_or("unknown"),
        BUILD
    );
}
Enables logging to stderr in Weld with the given log level.

This function is ignored if it has already been called once, or if some other code in the
process has initialized logging using Rust's `log` crate.
weld/src/lib.rs