You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
785 B
33 lines
785 B
8 months ago
|
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);
|
||
|
}
|
||
|
}
|
||
|
}
|