AlicizaX/Client/Packages/com.alicizax.unity/Runtime/Base/Log/Log.cs
陈思海 eb38f67131 init
2025-01-23 19:06:48 +08:00

40 lines
1.3 KiB
C#

using System;
using System.Diagnostics;
using Cysharp.Text;
using UnityEngine;
using Debug = UnityEngine.Debug;
namespace AlicizaX.Runtime
{
public static partial class Log
{
static void Print(GameFrameworkLogLevel logLevel, object message)
{
switch (logLevel)
{
case GameFrameworkLogLevel.Debug:
UnityEngine.Debug.Log($"<color=#gray><b>[Debug] ► </b></color> - {message}");
break;
case GameFrameworkLogLevel.Info:
UnityEngine.Debug.Log($"<color=white><b>[Info] ► </b></color> - {message}");
break;
case GameFrameworkLogLevel.Warning:
UnityEngine.Debug.LogWarning($"<color=#FF9400><b>[WARNING] ► </b></color> - {message}");
break;
case GameFrameworkLogLevel.Error:
UnityEngine.Debug.LogError($"<color=red><b>[ERROR] ► </b></color> - {message}");
break;
case GameFrameworkLogLevel.Fatal:
UnityEngine.Debug.LogException(new Exception($"<color=red><b>[Exception] ► </b></color> - {message}"));
break;
}
}
}
}