internal static void LogModError(string msg, string modname) { string namesection = (string.IsNullOrEmpty(modname) ? "" : ("[" + modname.Replace(" ", "_") + "] ")); Imports.Logger_LogModError(namesection, msg); if (!Imports.IsDebugMode() && consoleEnabled) { System.Console.ForegroundColor = ConsoleColor.Yellow; RainbowCheck(); System.Console.WriteLine("[" + GetTimestamp() + "] [MelonLoader] " + namesection + "[Error] " + msg); System.Console.ForegroundColor = ConsoleColor.Gray; } }
internal static void LogModError(string msg, string modname) { if (ErrorCount < MaxErrorCount) { string namesection = (string.IsNullOrEmpty(modname) ? "" : ("[" + modname.Replace(" ", "_") + "] ")); Imports.Logger_LogModError(namesection, msg); if (!Imports.IsDebugMode() && Console.Enabled) { Console.SetColor(ConsoleColor.Yellow); RainbowCheck(); System.Console.WriteLine("[" + GetTimestamp() + "] [MelonLoader] " + namesection + "[Error] " + msg); Console.SetColor(ConsoleColor.Gray); } ErrorCount++; } }