remove demolog

This commit is contained in:
ikpil 2023-04-14 22:14:10 +09:00
parent 6f758cabc0
commit 5806de7f82
1 changed files with 0 additions and 27 deletions

View File

@ -1,27 +0,0 @@
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using Serilog;
using Silk.NET.OpenGL;
namespace DotRecast.Recast.Demo;
public static class DemoLog
{
private static readonly ILogger Logger = Log.ForContext(typeof(DemoLog));
private static HashSet<string> messages = new();
public static void LogIfGlError(GL gl, [CallerMemberName] string method = "", [CallerFilePath] string file = "", [CallerLineNumber] int line = 0)
{
var err = gl.GetError();
if (err == GLEnum.NoError)
return;
var s = $"{method}() err({err}) in {file}:{line}";
if (messages.Contains(s))
return;
messages.Add(s);
Logger.Error(s);
}
}