Skip to content

[Bug]: Console log lines are prematurely truncated when they reach discord's character limit #225

Description

@DDark47

🐞 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions