Logger.cs 433 B

123456789101112131415161718192021
  1. using BepInEx.Logging;
  2. namespace BepInEx
  3. {
  4. public static class Logger
  5. {
  6. public static BaseLogger CurrentLogger { get; set; }
  7. public static void Log(LogLevel level, object entry)
  8. {
  9. CurrentLogger?.Log(level, entry);
  10. }
  11. public static void SetLogger(BaseLogger logger)
  12. {
  13. CurrentLogger?.Dispose();
  14. CurrentLogger = logger;
  15. }
  16. }
  17. }