123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using System;
- using System.Runtime.CompilerServices;
- using BepInEx.ConsoleUtil;
- namespace BepInEx
- {
-
-
-
- public static class BepInLogger
- {
-
-
-
-
-
- public delegate void EntryLoggedEventHandler(string entry, bool show = false);
-
-
-
- public static event EntryLoggedEventHandler EntryLogged;
-
-
-
-
-
-
- public static void Log(object entry, bool show = false, ConsoleColor color = ConsoleColor.Gray)
- {
- Log(entry.ToString(), show, color);
- }
-
-
-
-
-
-
- public static void Log(string entry, bool show = false, ConsoleColor color = ConsoleColor.Gray)
- {
- UnityEngine.UnityLogWriter.WriteStringToUnityLog($"BEPIN - {entry}\r\n");
- Kon.ForegroundColor = color;
- Console.WriteLine(entry);
- EntryLogged?.Invoke(entry, show);
- }
- }
- }
- namespace UnityEngine
- {
- internal sealed class UnityLogWriter
- {
- [MethodImpl(MethodImplOptions.InternalCall)]
- public static extern void WriteStringToUnityLog(string s);
- }
- }
|