Update Cryville.Common.Logging.

This commit is contained in:
2023-11-20 20:21:21 +08:00
parent e2c58c708f
commit c2e94afc1c
24 changed files with 280 additions and 140 deletions

View File

@@ -5,7 +5,6 @@
#if COMPILE
using Discord;
using System;
using Logger = Cryville.Common.Logging.Logger;
#endif
using UnityEngine;
@@ -25,7 +24,7 @@ namespace Cryville.Crtr {
launchTime = (long)(DateTime.UtcNow - DateTime.UnixEpoch).TotalSeconds;
try {
dc = new Discord.Discord(CLIENT_ID, (UInt64)CreateFlags.NoRequireDiscord);
Logger.Log("main", 1, "Discord", "Connected to Discord");
Game.MainLogger.Log(1, "Discord", "Connected to Discord");
am = dc.GetActivityManager();
SetIdle();
}
@@ -34,7 +33,7 @@ namespace Cryville.Crtr {
dc.Dispose();
dc = null;
}
Logger.Log("main", 3, "Discord", "Cannot connect to Discord");
Game.MainLogger.Log(3, "Discord", "Cannot connect to Discord");
}
}
@@ -46,7 +45,7 @@ namespace Cryville.Crtr {
catch (ResultException ex) {
dc.Dispose();
dc = null;
Logger.Log("main", 4, "Discord", "An error occurred while running callbacks: {0}", ex);
Game.MainLogger.Log(4, "Discord", "An error occurred while running callbacks: {0}", ex);
}
}