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); } }