Posted January 31, 201510 yr I know there is "org.apache.logging.log4j.Logger" that are being used throughout to print all kinds of messages. I want a call to logger.debug("Some awesome message"); to show up when I work in eclipse but not when the mod is deployed. How can I set the Level of Messages that are being print to the console to DEBUG?
January 31, 201510 yr There's a way to turn it on in the logger, but I'll be damned if I remember. You need to enable that debug in the logger, if you're going to log debug messages. -Mitchellbrine Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible. It may be freaking fucking hard though, but still possible If you create a topic on Modder Support, live by this motto: I don't want your charity, I want your information
January 31, 201510 yr Author Note to future readers: I gain access to the logger via @Mod.EventHandler public void preInit(FMLPreInitializationEvent pre) { logger = pre.getModLog(); } EDIT: I found this old thread but it is outdated and doesn't explain anything in the end. (How to use config/logging.properties, after all?)
January 31, 201510 yr Um... Nope.AVI. I mean, it's correct, but you can just use public static Logger logger = LogManager.getLogger("MyMod"); and be able to access the logger before the preInit. -Mitchellbrine Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible. It may be freaking fucking hard though, but still possible If you create a topic on Modder Support, live by this motto: I don't want your charity, I want your information
January 31, 201510 yr You can use it in core mods before the preInit event is EVER fired. -Mitchellbrine Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible. It may be freaking fucking hard though, but still possible If you create a topic on Modder Support, live by this motto: I don't want your charity, I want your information
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.