jyker/HMIcode/SmallProject/OpenBLive/Runtime/Utilities/Logger.cs
2025-08-21 20:47:08 +08:00

31 lines
625 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#if NET5_0_OR_GREATER
using System;
#else
using UnityEngine;
#endif
namespace OpenBLive.Runtime.Utilities
{
public static class Logger
{
public static void LogError(string logInfo)
{
#if NET5_0_OR_GREATER
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}{logInfo}");
#else
Debug.LogError(logInfo);
#endif
}
public static void Log(string logInfo)
{
#if NET5_0_OR_GREATER
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}{logInfo}");
#else
Debug.Log(logInfo);
#endif
}
}
}