outputs 0.0.2

A Rust print package for custom console output.
Documentation
use std::collections::HashMap;
use chrono::prelude::*;

pub struct Log;

impl Log {
    pub fn log(text: &str, kwargs: HashMap<&str, &str>) {
        let gray = "\x1b[90m"; // ANSI escape code for gray color
        let reset = "\x1b[0m"; // ANSI escape code to reset color

        let log_message = format!(
            "{} {}",
            text,
            kwargs
                .iter()
                .map(|(key, value)| format!("{}{}={}{}", gray, key, reset, value))
                .collect::<Vec<String>>()
                .join(" ")
        );

        let timestamp = Log::get_timestamp();
        println!("{} {}", timestamp, log_message);
    }

    fn get_timestamp() -> String {
        let dt = Local::now();
        dt.format("%Y-%m-%d %H:%M:%S").to_string()
    }
}


#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_log_function() {
        let mut kwargs = HashMap::new();
        kwargs.insert("key1", "value1");
        kwargs.insert("key2", "value2");

        Log::log("Test Logging:", kwargs);
        // Include assertions to validate the output or behavior
        // assert_eq!(expected_value, actual_value);
    }

    #[test]
    fn test_timestamp_function() {
        // Write tests for the timestamp function if needed
        // For example, check the output format, accuracy, etc.
        let timestamp = Log::get_timestamp();
        // assert_eq!(expected_timestamp_format, timestamp);
    }
}