Skip to content

Commit 4d8156b

Browse files
feat: Improve the logging of chat messages with exceptions
Adding in the chatter's username, id, and message to the exception logging for failing to process chat messages closes#63
1 parent 90164e5 commit 4d8156b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Nullinside.Api.TwitchBot/ChatRules/TwitchChatMessageMonitorConsumer.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
using Microsoft.EntityFrameworkCore;
66

7+
using Mysqlx.Expr;
8+
79
using Nullinside.Api.Common.Twitch;
810
using Nullinside.Api.Model;
911
using Nullinside.Api.Model.Ddl;
@@ -160,7 +162,7 @@ private async void MainLoop() {
160162
}
161163
}
162164
catch (Exception e) {
163-
LOG.Error($"{channel}: Failed to evaluate rule", e);
165+
LOG.Error($"{channel}: Failed to evaluate rule on {message.Username}({message.UserId}): {message.Message}", e);
164166
}
165167
}
166168
}

0 commit comments

Comments
 (0)