From 5806de7f82631a9898dd659d7650c0992b30ad54 Mon Sep 17 00:00:00 2001 From: ikpil Date: Fri, 14 Apr 2023 22:14:10 +0900 Subject: [PATCH] remove demolog --- src/DotRecast.Recast.Demo/DemoLog.cs | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 src/DotRecast.Recast.Demo/DemoLog.cs diff --git a/src/DotRecast.Recast.Demo/DemoLog.cs b/src/DotRecast.Recast.Demo/DemoLog.cs deleted file mode 100644 index 29c4b3a..0000000 --- a/src/DotRecast.Recast.Demo/DemoLog.cs +++ /dev/null @@ -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 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); - } - -} \ No newline at end of file