architectury-loom icon indicating copy to clipboard operation
architectury-loom copied to clipboard

Forge log4j configuration is not applied correctly on Windows

Open gingershaped opened this issue 11 months ago • 3 comments

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.

gingershaped avatar Mar 13 '24 22:03 gingershaped

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.

Juuxel avatar Mar 14 '24 23:03 Juuxel

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

boholder avatar Jul 23 '24 13:07 boholder

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

rlnt avatar Aug 26 '24 17:08 rlnt