log4j2 logger only prints to console, does not write to file in Minecraft 1.8.9?

Solution 1:

Just needed to add

-Dlog4j.configurationFile=/src/main/resources/log4j2.xml

in the vm Arguments.