Bläddra i källkod

Reroute deprecated logging class to new one

Bepis 6 år sedan
förälder
incheckning
34f03b2b97
1 ändrade filer med 6 tillägg och 9 borttagningar
  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);
         }
     }
 }