Jump to content

Is there a way to have quiet console output?


Oozekip

Recommended Posts

I'm fairly new to modding, so sorry if this is a simple question, but is there a way to silence the output so that this stuff does not appear in the Eclipse console:

 

NM5mkV6.png

 

I find theses messages largely unhelpful and annoying for what I'm doing right now, and I'd like to be able to have silent output unless there's either an issue or I explicitly say to print something. Is there a way to do this?

Link to comment
Share on other sites

You can achieve something like this by copying the log4j2.xml file from the Forge JAR into src/main/resources and modifying the level of the

SysOut

and

FmlSysOut

<AppenderRef>

elements to

WARN

,

ERROR

,

FATAL

or

OFF

(ordered from least specific [most messages] to most specific [least messages]).

 

This will be copied into your mod JAR when you build it with Gradle, which you don't want. There's probably a way to filter it out with Gradle, but I haven't managed to find that yet.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

To be more specific, use a log4j2

Logger

. You can get one with your mod's name from

FMLPreInitializationEvent#getModLog

or with any name you want from

LogManager.getLogger

.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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