using Spectre.Console; namespace SPT_AKI_Installer.Aki.Helper { public static class LogHelper { private static void Log(string tag, string message, string foreground, string background = "black") { AnsiConsole.MarkupLine($"[{foreground} on {background}][[{tag}]]: {message.EscapeMarkup()}[/]"); } /// /// Outputs a string to console starting with [USER] with /// Green text /// public static void User(string text) { Log("USER", text, "green"); } /// /// Outputs a string to console starting with [WARNING] with /// Yellow text /// public static void Warning(string text) { Log("WARNING", text, "yellow"); } /// /// Outputs a string to console starting with [ERROR] with /// Red text /// public static void Error(string text) { Log("ERROR", text, "red"); } /// /// Outputs a string to console starting with [INFO] with /// Blue text /// public static void Info(string text) { Log("INFO", text, "blue"); } } }