From 538808ec42c578bb06caf96fd8c641c39b72fd0d Mon Sep 17 00:00:00 2001 From: Mira <56395159+TheXorog@users.noreply.github.com> Date: Fri, 19 Aug 2022 20:21:18 +0200 Subject: [PATCH] Update Logger.cs --- Logger.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Logger.cs b/Logger.cs index 8b0515d..3b3800d 100644 --- a/Logger.cs +++ b/Logger.cs @@ -125,7 +125,7 @@ public class Logger : ILogger if (handler.maxLogLevel >= currentLog.LogLevel) { - Console.ResetColor(); Console.Write($"[{currentLog.TimeOfEvent:dd.MM.yyyy HH:mm:ss}] "); + Console.ResetColor(); Console.Write($"[{currentLog.TimeOfEvent:dd.MM.yyyy HH:mm:ss:fff}] "); Console.ForegroundColor = LogLevelColor; Console.BackgroundColor = BackgroundColor; Console.Write($"[{LogLevelText}]"); Console.ResetColor(); Console.WriteLine($" {LogMessage}"); @@ -142,7 +142,7 @@ public class Logger : ILogger { if (!handler.FileBlackList.Contains(currentLog.LogLevel)) { - Byte[] FileWrite = Encoding.UTF8.GetBytes($"[{currentLog.TimeOfEvent:dd.MM.yyyy HH:mm:ss}] [{LogLevelText}] {LogMessage}\n{(currentLog.Exception is not null ? $"{currentLog.Exception}\n" : "")}"); + Byte[] FileWrite = Encoding.UTF8.GetBytes($"[{currentLog.TimeOfEvent:dd.MM.yyyy HH:mm:ss:fff}] [{LogLevelText}] {LogMessage}\n{(currentLog.Exception is not null ? $"{currentLog.Exception}\n" : "")}"); if (handler.OpenedFile != null) { await handler.OpenedFile.WriteAsync(FileWrite.AsMemory(0, FileWrite.Length));