pacesetter 0.0.1

Meta-framework on top of axum
Documentation
use crate::Environment;

pub enum LogType {
    Info,
    Success,
    Error,
}

pub fn log_per_env(
    env: &Environment,
    log_type: LogType,
    dev_log: &str,
    test_log: &str,
    production_log: &str,
) {
    match env {
        Environment::Development => log(log_type, dev_log),
        Environment::Test => log(log_type, test_log),
        Environment::Production => log(log_type, production_log),
    }
}

pub fn log(log_type: LogType, log: &str) {
    match log_type {
        LogType::Info => println!("â„šī¸  {}", log),
        LogType::Success => println!("✅ {}", log),
        LogType::Error => println!("❌ {}", log),
    }
}