# HG changeset patch # User alys # Date 2021-04-30 03:55:21 # Node ID 191e165e522532f6342703c80f5fe4e6b8278c04 # Parent 6d2dc03c61a4736faf9f6c00b49a95e0f30a33f8 Add helper methods. (grafted from fd7b8d43e7da379d9b2aa0379803a5759b7e2ad5) diff --git a/isometric-park-fna/Logging.cs b/isometric-park-fna/Logging.cs --- a/isometric-park-fna/Logging.cs +++ b/isometric-park-fna/Logging.cs @@ -65,10 +65,70 @@ { Logging.Log_(level, message, lineNumber, caller, path); + } + public static void Critical(string message, + [CallerLineNumber] int lineNumber = 0, + [CallerMemberName] string caller = null, + [CallerFilePath] string path = "") + { + + Logging.Log_(LogLevel.Critical, message, lineNumber, caller, path); + } + + public static void Error(string message, + [CallerLineNumber] int lineNumber = 0, + [CallerMemberName] string caller = null, + [CallerFilePath] string path = "") + { + + Logging.Log_(LogLevel.Error, message, lineNumber, caller, path); } + public static void Warning(string message, + [CallerLineNumber] int lineNumber = 0, + [CallerMemberName] string caller = null, + [CallerFilePath] string path = "") + { + Logging.Log_(LogLevel.Warning, message, lineNumber, caller, path); + } + + public static void Success(string message, + [CallerLineNumber] int lineNumber = 0, + [CallerMemberName] string caller = null, + [CallerFilePath] string path = "") + { + + Logging.Log_(LogLevel.Success, message, lineNumber, caller, path); + } + + public static void Info(string message, + [CallerLineNumber] int lineNumber = 0, + [CallerMemberName] string caller = null, + [CallerFilePath] string path = "") + { + + Logging.Log_(LogLevel.Info, message, lineNumber, caller, path); + } + + public static void Debug(string message, + [CallerLineNumber] int lineNumber = 0, + [CallerMemberName] string caller = null, + [CallerFilePath] string path = "") + { + + Logging.Log_(LogLevel.Debug, message, lineNumber, caller, path); + } + + public static void Trace(string message, + [CallerLineNumber] int lineNumber = 0, + [CallerMemberName] string caller = null, + [CallerFilePath] string path = "") + { + + Logging.Log_(LogLevel.Trace, message, lineNumber, caller, path); + } } } diff --git a/isometric-park-fna/UI/DebugWindow.cs b/isometric-park-fna/UI/DebugWindow.cs --- a/isometric-park-fna/UI/DebugWindow.cs +++ b/isometric-park-fna/UI/DebugWindow.cs @@ -157,6 +157,14 @@ Logging.Log(LogLevel.Debug, "Test"); Logging.Log(LogLevel.Trace, "Test"); + Logging.Critical("Test"); + Logging.Error("Test"); + Logging.Warning("Test"); + Logging.Success("Test"); + Logging.Info("Test"); + Logging.Debug("Test"); + Logging.Trace("Test"); + } if (debugInfo.pastFps.Length >= 1) {