hypherionmc / hypherionmc/sdlink
[Bug]: Console log lines are prematurely truncated when they reach discord's character limit
- Dominant language
- Java
- Stars
- 38
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
### 🐞 Description
Title. Could be fixed by simply splitting the logs by every newline and moving the unfinishable line to the next message by testing if the current message is over 2k characters
### 🔄 Steps to reproduce
1. Set up console logging to discord
2. Get the console to print a lot of lines at once
3. Last line is truncated, you dont get to see the full line
### ✅ Expected behavior
**[16:04:05]** **[Worker-Main-3/ERROR]** *Couldn't parse element ResourceKey[minecraft:root / minecraft:loot_table]:createcasing:blocks/weathered_iron_slicer - Unknown registry key in ResourceKey[minecraft:root / minecraft:item]: createcasing:weathered_iron_slicer*
**[16:04:05]** **[Worker-Main-3/ERROR]** *Couldn't parse element ResourceKey[minecraft:root / minecraft:loot_table]:create_connected:blocks/dye_depot_amber_fan_dyeing_catalyst - Unknown registry key in ResourceKey[minecraft:root / minecraft:item]: create_connected:dye_depot_amber_fan_dyeing_catalyst*
**[16:04:06]** **[Worker-Main-3/ERROR]** *Couldn't parse element ResourceKey[minecraft:root / minecraft:loot_table]:createcasing:blocks/railway_slicer - Unknown registry key in ResourceKey[minecraft:root / minecraft:item]: createcasing:railway_slicer*
**[16:04:06]** **[Worker-Main-3/ERROR]** *Couldn't parse element ResourceKey[minecraft:root / minecraft:loot_table]:createcasing:blocks/industrial_iron_slicer - Unknown registry key in ResourceKey[minecraft:root / minecraft:item]: createcasing:industrial_iron_slicer*
**[16:04:06]** **[Worker-Main-3/ERROR]** *Couldn't parse element ResourceKey[minecraft:root / minecraft:loot_table]:createcasing:blocks/shadow_steel_slicer - Unknown registry key in ResourceKey[minecraft:root / minecraft:item]: createcasing:shadow_steel_slicer*
**[16:04:06]** **[Worker-Main-3/ERROR]** *Couldn't parse element ResourceKey[minecraft:root / minecraft:loot_table]:create_connected:blocks/dye_depot_slate_fan_dyeing_catalyst - Unknown registry key in ResourceKey[minecraft:root / minecraft:item]: create_connected:dye_depot_slate_fan_dyeing_catalyst*
**[16:04:06]** **[Worker-Main-3/ERROR]** *Couldn't parse element ResourceKey[minecraft:root / minecraft:loot_table]:create_connected:blocks/dye_depot_rose_fan_dyeing_catalyst - Unknown registry key in ResourceKey[minecraft:root / minecraft:item]: create_connected:dye_depot_rose_fan_dyeing_catalyst*
### ❌ Actual behavior
**[16:04:05]** **[Worker-Main-3/ERROR]** *Couldn't parse element ResourceKey[minecraft:root / minecraft:loot_table]:createcasing:blocks/weathered_iron_slicer - Unknown registry key in ResourceKey[minecraft:root / minecraft:item]: createcasing:weathered_iron_slicer*
**[16:04:05]** **[Worker-Main-3/ERROR]** *Couldn't parse element ResourceKey[minecraft:root / minecraft:loot_table]:create_connected:blocks/dye_depot_amber_fan_dyeing_catalyst - Unknown registry key in ResourceKey[minecraft:root / minecraft:item]: create_connected:dye_depot_amber_fan_dyeing_catalyst*
**[16:04:06]** **[Worker-Main-3/ERROR]** *Couldn't parse element ResourceKey[minecraft:root / minecraft:loot_table]:createcasing:blocks/railway_slicer - Unknown registry key in ResourceKey[minecraft:root / minecraft:item]: createcasing:railway_slicer*
**[16:04:06]** **[Worker-Main-3/ERROR]** *Couldn't parse element ResourceKey[minecraft:root / minecraft:loot_table]:createcasing:blocks/industrial_iron_slicer - Unknown registry key in ResourceKey[minecraft:root / minecraft:item]: createcasing:industrial_iron_slicer*
**[16:04:06]** **[Worker-Main-3/ERROR]** *Couldn't parse element ResourceKey[minecraft:root / minecraft:loot_table]:createcasing:blocks/shadow_steel_slicer - Unknown registry key in ResourceKey[minecraft:root / minecraft:item]: createcasing:shadow_steel_slicer*
**[16:04:06]** **[Worker-Main-3/ERROR]** *Couldn't parse element ResourceKey[minecraft:root / minecraft:loot_table]:create_connected:blocks/dye_depot_slate_fan_dyeing_catalyst - Unknown registry key in ResourceKey[minecraft:root / minecraft:item]: create_connected:dye_depot_slate_fan_dyeing_catalyst*
**[16:04:06]** **[Worker-Main-3/ERROR]** *Couldn't parse element ResourceKey[minecraft:root / minecraft:loot_table]:create_connected:blocks/dye_depot_rose_fan_dyeing_catalyst - Unknown registry key in ResourceKey[minecraft:root / minecraft:item]: create_connected:dye_depot_rose_fan_dyeing_catalyst*
**[16:04:06]** **[Worker-Main-3/ERROR]** *Could
### 🎮 Minecraft Version
1.21.1
### 🛠️ Mod Version
3.4.3+snapshot.4
### 📦 Mod Loader
NeoForge
### 🔧 Mod Loader Version
21.1.233
### 📚 CraterLib Version
1.21-3.1.2
### 📜 Logs & Screenshots
_No response_
Contributor guide
Research direction
Start by reproducing console logging with a large multi-line output using the listed Minecraft, NeoForge, mod, and CraterLib versions, then trace the console-to-Discord logging path. Done means complete log lines are delivered across messages without truncation and each Discord message stays within the character limit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 56/100