- [Core] Add option to toggle logger events [GUI/CLI]

This commit is contained in:
Razmoth
2024-01-22 20:22:55 +04:00
parent 0cdad5ef1a
commit 59478d9c05
11 changed files with 125 additions and 91 deletions

View File

@@ -8,14 +8,17 @@ namespace AssetStudio.GUI
public bool ShowErrorMessage = true;
private Action<string> action;
public bool Silent { get; set; }
public LoggerEvent Flags { get; set; }
public GUILogger(Action<string> action)
{
this.action = action;
}
public void Log(LoggerEvent loggerEvent, string message, bool silent = false)
public void Log(LoggerEvent loggerEvent, string message)
{
if (silent)
if (!Flags.HasFlag(loggerEvent) || Silent)
return;
switch (loggerEvent)