configuration rework

This commit is contained in:
rootdarkarchon
2023-02-04 15:53:23 +01:00
parent f389bed4e1
commit 7c97d1994c
50 changed files with 722 additions and 275 deletions

View File

@@ -31,13 +31,13 @@ internal class Logger : ILogger
public static void Error(string? msg, Exception ex)
{
var caller = new StackTrace().GetFrame(1)?.GetMethod()?.ReflectedType?.Name ?? "Unknown";
PluginLog.Error($"[{caller}] {msg} {Environment.NewLine} Exception: {ex.Message} {Environment.NewLine} {ex.StackTrace}");
PluginLog.Error($"[{caller}] {msg} {Environment.NewLine} Exception: {ex?.ToString()}");
}
public static void Warn(string? msg, Exception ex)
{
var caller = new StackTrace().GetFrame(1)?.GetMethod()?.ReflectedType?.Name ?? "Unknown";
PluginLog.Warning($"[{caller}] {msg} {Environment.NewLine} Exception: {ex.Message} {Environment.NewLine} {ex.StackTrace}");
PluginLog.Warning($"[{caller}] {msg} {Environment.NewLine} Exception: {ex?.ToString()}");
}
public static void Error(string? msg)