mirror of
https://github.com/RaindropViewer/RaindropViewer.git
synced 2026-07-29 19:03:10 +00:00
24 lines
560 B
C#
24 lines
560 B
C#
using log4net.Appender;
|
|
using log4net.Core;
|
|
using UnityEngine;
|
|
|
|
public class UnityDebugAppender : AppenderSkeleton
|
|
{
|
|
protected override void Append(LoggingEvent loggingEvent)
|
|
{
|
|
var level = loggingEvent.Level;
|
|
|
|
if (level == Level.Warn)
|
|
{
|
|
Debug.LogWarning(RenderLoggingEvent(loggingEvent));
|
|
return;
|
|
}
|
|
if (level == Level.Error)
|
|
{
|
|
Debug.LogError(RenderLoggingEvent(loggingEvent));
|
|
return;
|
|
}
|
|
|
|
Debug.Log(RenderLoggingEvent(loggingEvent));
|
|
}
|
|
} |