Beispiel #1
0
        public static void LogError(string s)
        {
            string namesection = GetNameSection();

            Imports.Logger_LogError(namesection, s);
            if (!Imports.IsDebugMode() && consoleEnabled)
            {
                System.Console.ForegroundColor = ConsoleColor.Red;
                RainbowCheck();
                System.Console.WriteLine("[" + GetTimestamp() + "] [MelonLoader] " + namesection + "[Error] " + s);
                System.Console.ForegroundColor = ConsoleColor.Gray;
            }
        }
Beispiel #2
0
 public static void LogError(string s)
 {
     if (ErrorCount < MaxErrorCount)
     {
         string namesection = GetNameSection();
         Imports.Logger_LogError(namesection, s);
         if (!Imports.IsDebugMode() && Console.Enabled)
         {
             Console.SetColor(ConsoleColor.Red);
             RainbowCheck();
             System.Console.WriteLine("[" + GetTimestamp() + "] [MelonLoader] " + namesection + "[Error] " + s);
             Console.SetColor(ConsoleColor.Gray);
         }
         ErrorCount++;
     }
 }
 public static void LogError(string s, params object[] args)
 {
     if (ErrorCount < MaxErrorCount)
     {
         string namesection = GetNameSection();
         var    formatted   = string.Format(s, args);
         Imports.Logger_LogError(namesection, formatted);
         if (!Imports.IsDebugMode() && Console.Enabled)
         {
             Imports.Console_SetColor(ConsoleColor.Red);
             RainbowCheck();
             System.Console.WriteLine("[" + GetTimestamp() + "] [MelonLoader] " + namesection + "[Error] " + formatted);
             Imports.Console_SetColor(ConsoleColor.Gray);
         }
         ErrorCount++;
     }
 }