diff --git a/.gitignore b/.gitignore index 669fa03..2ae3d85 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -/.config.toml \ No newline at end of file +/.config.toml +bin +obj \ No newline at end of file diff --git a/src/Zirconium/Core/Logging/Log.cs b/src/Zirconium/Core/Logging/Log.cs index 7d0c801..f9d8687 100644 --- a/src/Zirconium/Core/Logging/Log.cs +++ b/src/Zirconium/Core/Logging/Log.cs @@ -42,5 +42,9 @@ namespace Zirconium.Core.Logging public static void Info(string message) { _defaultLogger.Info(message); } + + public static void Debug(string message) { + _defaultLogger.Debug(message); + } } } \ No newline at end of file diff --git a/src/Zirconium/Core/Logging/Logger.cs b/src/Zirconium/Core/Logging/Logger.cs index 1405fb9..adb1ec4 100644 --- a/src/Zirconium/Core/Logging/Logger.cs +++ b/src/Zirconium/Core/Logging/Logger.cs @@ -34,6 +34,12 @@ namespace Zirconium.Core.Logging } } + public void Debug(string message) { + if (_isVerbose) { + writeLog(LogType.Debug, message); + } + } + public void Fatal(string message) { writeLog(LogType.Fatal, message); System.Environment.Exit(1); @@ -70,6 +76,10 @@ namespace Zirconium.Core.Logging tagFormatter = new Formatter("WARNING", Color.Yellow); break; } + case LogType.Debug: { + tagFormatter = new Formatter("DEBUG", Color.Lime); + break; + } default: { tagFormatter = new Formatter("UNKNOWN", Color.Green); break; @@ -87,7 +97,8 @@ namespace Zirconium.Core.Logging Error, Fatal, Info, - Warning + Warning, + Debug } } } \ No newline at end of file