Added logger

This commit is contained in:
Simon Lübeß
2020-11-05 22:20:09 +01:00
parent bf796a2a25
commit 0cf3f5f572
12 changed files with 321 additions and 8 deletions
+24
View File
@@ -0,0 +1,24 @@
using System;
namespace GlitchLog
{
/**
* Defines the severity level of a log message.
* @remarks also used to determine which levels will be logged.
*/
public enum LogLevel
{
case Trace = 0;
case Debug;
case Info;
case Warning;
case Error;
case Critical;
case Off;
public static readonly StringView[?] UpperStringViews = .("TRACE", "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL", "OFF");
[Inline]
public StringView UpperString => UpperStringViews[this.Underlying];
}
}