Spectrum

Spectrum

2M Downloads

[Suggestion] Replace Log4J with SLF4J

Jack-Papel opened this issue ยท 1 comments

commented

In 1.18.2, Mojang changed their logging from using Log4j to using SLF4J. Switching to SLF4J would aid in the use of Minecraft's logging utilities, among other things. Going forward, it's probably in your best interest to upgrade to the new logging system.

Here's a resource on switching. It should only be a few lines of code changed.

By the way, most mods use their mod name as the name of their logger rather than the mod ID. (e.g. REI, Fabric, Indigo, Minecraft).
The resource suggests using LogUtils.getLogger() to do this. Doing it this way makes the logger name the same as the name of the class that called it, which usually has the same name as the mod.
However, because your initializer class is called SpectrumCommon, it would name it SpectrumCommon instead. If you don't want to change the name of the class, you can use LoggerFactory.getLogger("Spectrum") instead.

commented

done. Ty for the hint!