Additional logging for debugging missed sent messages

This commit is contained in:
barelyprofessional
2024-08-13 17:10:49 +08:00
parent 06c64778ce
commit 59ec8f8850

View File

@@ -563,8 +563,10 @@ public class ChatBot
sent.Message == decodedMessage && sent.Status == SentMessageTrackerStatus.WaitingForResponse);
if (sentMessage == null)
{
_logger.Info("Received message from Sneedchat that I sent but have no idea about. Bot restart? Ignoring it.");
_logger.Info(JsonSerializer.Serialize(message));
_logger.Error("Received message from Sneedchat that I sent but have no idea about. Message Data Follows:");
_logger.Error(JsonSerializer.Serialize(message));
_logger.Error("Last item inserted into the sent messages collection:");
_logger.Error(JsonSerializer.Serialize(_sentMessages.LastOrDefault()));
}
else
{