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

@@ -11,7 +11,6 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEngine;
using Logger = Cryville.Common.Logging.Logger;
namespace Cryville.Crtr.Browsing {
internal class LegacyResourceManager : IPathedResourceManager<ChartDetail> {
@@ -41,7 +40,7 @@ namespace Cryville.Crtr.Browsing {
}
void OnFileWatcherError(object sender, ErrorEventArgs e) {
Logger.Log("main", 4, "Data", "An error occurred while watching file changes: {0}", e.GetException());
Game.MainLogger.Log(4, "Data", "An error occurred while watching file changes: {0}", e.GetException());
}
void OnFileChanged(object sender, FileSystemEventArgs e) {
@@ -235,13 +234,13 @@ namespace Cryville.Crtr.Browsing {
void LogAndPopup(int level, string format, params object[] args) {
var msg = string.Format(format, args);
Logger.Log("main", level, "Resource", msg);
Game.MainLogger.Log(level, "Resource", msg);
Popup.Create(msg);
}
void LogAndPopupExtra(int level, object extraLog, string format, params object[] args) {
var msg = string.Format(format, args);
Logger.Log("main", level, "Resource", "{0}\n{1}", msg, extraLog);
Game.MainLogger.Log(level, "Resource", "{0}\n{1}", msg, extraLog);
Popup.Create(msg);
}