ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'org.apache.logging.log4j.simplelog.StatusLogger.level' to TRACE to show Log4j2 internal initialization logging.
01:16:25.288 [Client thread] ERROR net.minecraft.client.resources.ResourceIndex - Can't find the resource index file: assets\indexes\1.12.json
Exception in thread "Client thread"
Process finished with exit code 1
I do not know what to do
CodePudding user response:
As stated in the error; you can set the StatusLogger.level
to Trace
, or try putting the main method in a try-catch block.
But you probably didn't configure log4j2 correctly, configuration file can help.
CodePudding user response:
To configure log4j2, create a file called log4j2.xml on your classpath with this content:
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger - %msg%n"/>
</Console>
</Appenders>
<Loggers>
<Root level="trace">
<AppenderRef ref="Console"/>
</Root>
</Loggers>
</Configuration>
See also https://logging.apache.org/log4j/2.x/manual/configuration.html