mirror of
https://github.com/JonasunderscoreJones/BuildGPT.git
synced 2025-10-23 16:59:17 +02:00
Use Logger instead of println (#126)
This commit is contained in:
parent
9df9227ee7
commit
3829e2132d
2 changed files with 10 additions and 2 deletions
|
|
@ -1,14 +1,21 @@
|
|||
package net.fabricmc.example;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
public class ExampleMod implements ModInitializer {
|
||||
// This logger is used to write text to the console and the log file.
|
||||
// It is considered best practice to use your mod id as the logger's name.
|
||||
// That way, it's clear which mod wrote info, warnings, and errors.
|
||||
public static final Logger LOGGER = LogManager.getLogger("modid");
|
||||
|
||||
@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.info("Hello Fabric world!");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue