ChatLogger is a simple Minecraft mod for Fabric 1.21.4 that automatically logs all in-game chat messages to a file called chatlogs.txt. It works on the client and records:
- Regular chat messages (
username > text) - Join/leave messages (
XXX joined from XXX,XXX left the game)
- Logs chat messages with timestamps to
chatlogs.txtin your Minecraft instance folder. - Includes a Python script to send chat messages to a Discord webhook in real time.
- Prevents duplicate messages and supports a configurable cooldown between Discord sends.
-
Download the pre-built mod file for Minecraft 1.21.4 from the GitHub Actions (see the Actions tab or Releases).
-
Place
chatlogger-1.0.0.jarin yourmodsfolder of your Fabric Minecraft instance. -
Make sure you have Fabric API installed.
- Start Minecraft with Fabric Loader.
- Chat messages will be logged to
chatlogs.txtin your instance folder.
- Use the included
send_chat_to_discord.pyPython script to forward chat messages to a Discord webhook. - On first run, the script will create and open
config.txt. Edit it with your Discord webhook link, Minecraft path, and preferred cooldown. - The script will only send the last 15 messages on startup, then send new messages as they appear.
link = "https://discord.com/api/webhooks/your_webhook_here"
mcpath = "C:\Users\yourname\MultiMC\instances\1.21.4\.minecraft"
cooldown_sec = 1.5
- To use the Discord script, install Python 3 and run:
pip install -r requirements.txt
- This installs the
requestslibrary needed for Discord webhook support.
- If chat is not being logged, make sure the mod is loaded and Fabric API is installed.
- If the Python script does not send messages, check your webhook link and Minecraft path in
config.txt.
- Made by beak2825
Enjoy logging and forwarding your Minecraft chat! If you do use this, please add jarivivi on discord, show what you like about it.