Update ExplorerCore.cs

This commit is contained in:
Sinai 2021-04-22 19:12:16 +10:00
parent fdfadcefc1
commit 0d385c9cb8

View File

@ -84,19 +84,24 @@ namespace UnityExplorer
#region LOGGING #region LOGGING
public static void Log(object message) public static void Log(object message)
=> Log(message, LogType.Log, false); => Log(message, LogType.Log);
public static void LogWarning(object message) public static void LogWarning(object message)
=> Log(message, LogType.Warning, false); => Log(message, LogType.Warning);
public static void LogError(object message) public static void LogError(object message)
=> Log(message, LogType.Error, false); => Log(message, LogType.Error);
internal static void Log(object message, LogType logType, bool isFromUnity = false) public static void LogUnity(object message, LogType logType)
{ {
if (isFromUnity && !ConfigManager.Log_Unity_Debug.Value) if (!ConfigManager.Log_Unity_Debug.Value)
return; return;
Log($"[Unity] {message}", logType);
}
private static void Log(object message, LogType logType)
{
string log = message?.ToString() ?? ""; string log = message?.ToString() ?? "";
switch (logType) switch (logType)