33 lines
785 B
C#
Raw Normal View History

2024-08-17 14:27:18 +08:00
using System;
namespace BestHTTP.Logger
{
public sealed class UnityOutput : ILogOutput
{
public void Write(Loglevels level, string logEntry)
{
switch (level)
{
case Loglevels.All:
case Loglevels.Information:
UnityEngine.Debug.Log(logEntry);
break;
case Loglevels.Warning:
UnityEngine.Debug.LogWarning(logEntry);
break;
case Loglevels.Error:
case Loglevels.Exception:
UnityEngine.Debug.LogError(logEntry);
break;
}
}
public void Dispose()
{
GC.SuppressFinalize(this);
}
}
}