[RM] Removed Logger Counter

This commit is contained in:
TheXorog 2022-05-04 14:51:32 +02:00
parent 2ec5d4ff71
commit 5199e39157
Signed by untrusted user who does not match committer: Xorog
GPG key ID: 983798ED9C3E7C36

View file

@ -77,13 +77,12 @@ public class Logger : ILogger
for (int i = 0; i < _loggerObjects.LogsToPost.Count; i++) for (int i = 0; i < _loggerObjects.LogsToPost.Count; i++)
{ {
var currentLog = _loggerObjects.LogsToPost.First(); var currentLog = _loggerObjects.LogsToPost[0];
_loggerObjects.LogsToPost.Remove(currentLog); _loggerObjects.LogsToPost.Remove(currentLog);
if (currentLog is null || currentLog.Message is null)
if (currentLog is null)
{ {
LogWarn($"Missed log message due to garbage collection");
_loggerObjects.LogsToPost.Remove(currentLog);
continue; continue;
} }