People search "twitch chat logs" about 6,600 times a month in the US, and most of them hit the same wall: Twitch has no API that returns chat from the past. Helix doesn't have one, and neither does EventSub. If a message isn't captured while it scrolls by, it's gone for you. So a chat log is something you build going forward: connect, listen, store.
This post builds twitchlog , a small Go program that does exactly that:
log connects to Twitch chat over its IRC WebSocket, joins channels, and writes every message to SQLite, along with subs, raids, timeouts, bans, and room settings
search runs full-text queries (FTS5) across everything you've logged
export prints a plain-text log for one channel and day, or for one chatter
stats summarizes a channel: messages per minute, unique chatters, subscriber share, moderation, top Twitch emotes, events
import rebuilds the database from the raw IRC log, so the raw log is your source of truth
live (optional) checks which channels are live before you join them
It's…