Преглед на файлове

Reroute deprecated logging class to new one

Bepis преди 6 години
родител
ревизия
34f03b2b97
променени са 1 файла, в които са добавени 6 реда и са изтрити 9 реда
  1. 6 9
      BepInEx/Deprecated/BepInLogger.cs

+ 6 - 9
BepInEx/Deprecated/BepInLogger.cs

@@ -1,5 +1,5 @@
 using System;
-using BepInEx.ConsoleUtil;
+using BepInEx.Logging;
 
 namespace BepInEx
 {
@@ -28,7 +28,9 @@ namespace BepInEx
         /// <param name="show">Whether or not it should be dislpayed to the user.</param>
         public static void Log(string entry, bool show = false)
         {
-            Log(entry, show, ConsoleColor.Gray);
+	        Logger.Log(show ? LogLevel.Message : LogLevel.Info, entry);
+
+	        EntryLogged?.Invoke(entry, show);
         }
 
         /// <summary>
@@ -39,7 +41,7 @@ namespace BepInEx
         /// <param name="color">The color of the text to show in the console.</param>
         public static void Log(object entry, bool show, ConsoleColor color)
         {
-            Log(entry.ToString(), show, color);
+	        Log(entry.ToString(), show);
         }
 
         /// <summary>
@@ -50,12 +52,7 @@ namespace BepInEx
         /// <param name="color">The color of the text to show in the console.</param>
         public static void Log(string entry, bool show, ConsoleColor color)
         {
-            UnityEngine.UnityLogWriter.WriteStringToUnityLog($"BEPIN - {entry}\r\n");
-
-            Kon.ForegroundColor = color;
-            Console.WriteLine(entry);
-
-            EntryLogged?.Invoke(entry, show);
+			Log(entry, show);
         }
     }
 }