diff --git a/EightBit/AbstractLogger.cs b/EightBit/AbstractLogger.cs index 3a29855..53fa806 100644 --- a/EightBit/AbstractLogger.cs +++ b/EightBit/AbstractLogger.cs @@ -17,10 +17,16 @@ set => this._context = value; } + public bool Debugging + { + get => this.Verbosity > ILogger.LogLevel.Information; + set => throw new NotImplementedException("Derived from logging verbosity"); + } + public bool Strict { - get => this.Verbosity < ILogger.LogLevel.Information; - set => throw new NotImplementedException("Strictness is derived from logging verbosity"); + get => this.Debugging; + set => throw new NotImplementedException("Derived from logging verbosity"); } public abstract void Log(string context, string message, ILogger.LogLevel level); diff --git a/EightBit/ILogger.cs b/EightBit/ILogger.cs index aecd7db..271cc16 100644 --- a/EightBit/ILogger.cs +++ b/EightBit/ILogger.cs @@ -2,7 +2,7 @@ { public interface ILogger { - enum LogLevel { Debugging, Information, Warning, Critical, } + enum LogLevel { Critical, Warning, Information, Debugging } abstract string Context { get; set; } @@ -10,13 +10,15 @@ abstract bool Strict { get; set; } + abstract bool Debugging { get; set; } + abstract void Log(string context, string message, LogLevel level); void Log(string message, LogLevel level) => this.Log(this.Context, message, level); void MaybeLog(string message, LogLevel level) { - if (level >= this.Verbosity) + if (level <= this.Verbosity) this.Log(message, level); } diff --git a/Gaming/Wrapper.cs b/Gaming/Wrapper.cs index a4e31e7..10ecd31 100644 --- a/Gaming/Wrapper.cs +++ b/Gaming/Wrapper.cs @@ -6,7 +6,7 @@ public class Wrapper(ILogger.LogLevel logging = ILogger.LogLevel.Warning) : Device { - private readonly ILogger _logger = new SdlLogger("Unnamed Game"); + private readonly ILogger _logger = new ConsoleLogger("Unnamed Game"); private ILogger.LogLevel _verbosity = logging;