Jump to content

[SOLVED][1.10.2]How to access DEBUG level from forge


Recommended Posts

Posted

Okay, so I have a question about how to access through forge if eclipse is in debug mode. I have already tried

if(FMLRelaunchLog.log.getLogger().isDebugEnabled()){

System.out.println("slfjs");

}

 

yet it always seems to be true, whether in debug or not. I noticed that the apache Logger class has debug set to true, yet

/**

  * Checks whether this Logger is enabled for the {@link Level#DEBUG DEBUG} Level.

  *

  * @return boolean - {@code true} if this Logger is enabled for level

  *        DEBUG, {@code false} otherwise.

  */

if the info also provided for the isDebugEnabled. So my question is how do i find the correct way to see if forge has set the debug level to be false, so that i can use the the stated method above. Also, currently using forge 12.18.1.2011.

    - thanks in advance for any who respond - draganz

Posted

Just do a debug level print and it will filter then out automatically if they are not enabled.

The way minecraft is setup debug logging is ALWAYS enabled for the text files, but only info on the console, there can be multiple log levels from multiple different log listeners in log4j

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

Just do a debug level print and it will filter then out automatically if they are not enabled.

The way minecraft is setup debug logging is ALWAYS enabled for the text files, but only info on the console, there can be multiple log levels from multiple different log listeners in log4j

I know this might be a bit off-topic for this thread, but I just wanted to use the opportunity to ask, since my own thread did not give me much answers. Is there a way to tell log4j logger to print logs with a certain marker into a separate log file? I've been successful in creating my own logger that does that job, but I just feel there is a more simple way.

I still haven't published a mod because I can never get that in-dev version just right to warrant a public release. And yes, after two years of mod development I am still learning to speak Java.

 

Follow me on GitHub: https://github.com/yooksi

Contact me on Twitter: https://twitter.com/yooksi

Read my Minecraft blog: https://yooksidoesminecraft.blogspot.de/

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.