mirror of
https://github.com/soarqin/DSP_Mods_TO.git
synced 2025-12-14 10:33:31 +08:00
Added CruiseAssist and AutoPilot
This commit is contained in:
34
CruiseAssist/Commons/LogManager.cs
Normal file
34
CruiseAssist/Commons/LogManager.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System.Reflection;
|
||||
using BepInEx.Logging;
|
||||
|
||||
namespace CruiseAssist.Commons;
|
||||
|
||||
internal static class LogManager
|
||||
{
|
||||
public static ManualLogSource Logger { private get; set; }
|
||||
|
||||
public static void LogInfo(object data)
|
||||
{
|
||||
Logger.LogInfo(data);
|
||||
}
|
||||
|
||||
public static void LogInfo(MethodBase method)
|
||||
{
|
||||
Logger.LogInfo(method.DeclaringType.Name + "." + method.Name);
|
||||
}
|
||||
|
||||
public static void LogInfo(MethodBase method, object data)
|
||||
{
|
||||
Logger.LogInfo(string.Concat(method.DeclaringType.Name, ".", method.Name, ": ", data?.ToString()));
|
||||
}
|
||||
|
||||
public static void LogError(object data)
|
||||
{
|
||||
Logger.LogError(data);
|
||||
}
|
||||
|
||||
public static void LogError(MethodBase method, object data)
|
||||
{
|
||||
Logger.LogError(string.Concat(method.DeclaringType.Name, ".", method.Name, ": ", data?.ToString()));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user