architectury / architectury-loom

A Gradle plugin to setup environments for Fabric, Forge, NeoForge and Quilt modding.
https://docs.architectury.dev/loom/introduction
MIT License
115 stars 40 forks source link

Forge log4j configuration is not applied correctly on Windows #200

Open gingershaped opened 7 months ago

gingershaped commented 7 months ago

The launch.cfg file generated by the generateDLIConfig task sets the property log4j.configurationFile to the raw path of the log4j.xml located in .gradle/loom-cache. Log4j subsequently attempts to parse this path as a URI. This works on Linux, but fails on Windows because Windows paths are not valid URIs.

Juuxel commented 7 months ago

I can confirm this, actually, but I have no clue why it only works on Fabric... I think we can switch to setting the property to an URI if that fixes the bug.

boholder commented 3 months ago

Hope this can be your reference: https://github.com/boholder/minecraft-access/blob/1.20/common/src/main/resources/log4j.xml https://github.com/boholder/minecraft-access/blob/c9218e7d9b80d17e52d702b0d217a4048f80c6c3/forge/build.gradle#L24

rlnt commented 2 months ago

Can confirm this on NeoForge 1.21.1

WARN StatusConsoleListener Error parsing URI C:\Users\rlnt\repos\unified\multi-1.21\NeoForge\.gradle\loom-cache\log4j.xml
WARN StatusConsoleListener Advanced terminal features are not available in this environment
Architect Plugin: 3.4.159
Architectury Loom: 1.7.412