public static void Log(string s) { string namesection = GetNameSection(); Imports.Logger_Log(namesection + s); if (!Imports.IsDebugMode() && Console.Enabled) { bool rainbow_check = RainbowCheck(); System.Console.Write("["); if (!rainbow_check) { Console.SetColor(ConsoleColor.Green); } System.Console.Write(GetTimestamp()); if (!rainbow_check) { Console.SetColor(ConsoleColor.Gray); } System.Console.Write("] ["); if (!rainbow_check) { Console.SetColor(ConsoleColor.Magenta); } System.Console.Write("MelonLoader"); if (!rainbow_check) { Console.SetColor(ConsoleColor.Gray); } System.Console.WriteLine("] " + namesection + s); if (rainbow_check) { Console.SetColor(ConsoleColor.Gray); } } }
public static void Log(string s, params object[] args) { string namesection = GetNameSection(); var formatted = string.Format(s, args); Imports.Logger_Log(namesection + formatted); if (!Imports.IsDebugMode() && Console.Enabled) { bool rainbow_check = RainbowCheck(); System.Console.WriteLine("[" + GetTimestamp() + "] [MelonLoader] " + namesection + formatted); if (rainbow_check) { Console.SetColor(ConsoleColor.Gray); } } }