Use Logger instead of println
parent
27c0acc531
commit
a4260ec4fd
@ -1,14 +1,19 @@
|
||||
package net.fabricmc.example;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
public class ExampleMod implements ModInitializer {
|
||||
public static final Logger LOGGER = LogManager.getLogger();
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
// This code runs as soon as Minecraft is in a mod-load-ready state.
|
||||
// However, some things (like resources) may still be uninitialized.
|
||||
// Proceed with mild caution.
|
||||
|
||||
System.out.println("Hello Fabric world!");
|
||||
LOGGER.log(Level.INFO, "Hello Fabric world!");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue