From ff53201bd4fcc926316f628409fdf274a171c8be Mon Sep 17 00:00:00 2001 From: corentinmace Date: Wed, 16 Jul 2025 16:09:25 +0200 Subject: [PATCH] Renamed log buffer variable --- DS_Map/AppLogger.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DS_Map/AppLogger.cs b/DS_Map/AppLogger.cs index bb539e7..c3ed1ab 100644 --- a/DS_Map/AppLogger.cs +++ b/DS_Map/AppLogger.cs @@ -22,7 +22,7 @@ namespace DSPRE public static class AppLogger { private static readonly object _fileLock = new object(); - private static readonly ConcurrentQueue _inMemoryLog = new ConcurrentQueue(); + private static readonly ConcurrentQueue _recentLogBuffer = new ConcurrentQueue(); private static string _logFilePath; private static MainProgram _mainProgram; private const int MaxInMemoryLines = 500; @@ -51,8 +51,8 @@ namespace DSPRE File.AppendAllText(_logFilePath, timestamped + Environment.NewLine); } - _inMemoryLog.Enqueue(timestamped); - while (_inMemoryLog.Count > MaxInMemoryLines && _inMemoryLog.TryDequeue(out _)) { } + _recentLogBuffer.Enqueue(timestamped); + while (_recentLogBuffer.Count > MaxInMemoryLines && _recentLogBuffer.TryDequeue(out _)) { } } public static void Debug(string message) => Log(LogLevel.Debug, message); @@ -63,7 +63,7 @@ namespace DSPRE public static string GetRecentLogs() { - return string.Join(Environment.NewLine, _inMemoryLog); + return string.Join(Environment.NewLine, _recentLogBuffer); } }