From a1ced320ae27f0747800a455ad9a4661e421c949 Mon Sep 17 00:00:00 2001 From: Paul Hebble Date: Sun, 31 Mar 2024 11:25:32 -0500 Subject: [PATCH] Omit duplicate inflation warnings in queue --- Netkan/QueueAppender.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Netkan/QueueAppender.cs b/Netkan/QueueAppender.cs index d9cd91a7bd..ee9ddf9943 100644 --- a/Netkan/QueueAppender.cs +++ b/Netkan/QueueAppender.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; + using log4net.Core; using log4net.Appender; @@ -10,9 +11,13 @@ public QueueAppender() { } protected override void Append(LoggingEvent evt) { - Warnings.Add(evt.RenderedMessage); + // Skip duplicate messages for better multi-kref handling + if (!Warnings.Contains(evt.RenderedMessage)) + { + Warnings.Add(evt.RenderedMessage); + } } - public List Warnings = new List(); + public readonly List Warnings = new List(); } }