Hi, I’m working on a project I’d like to keep undisclosed for the time being and I was wondering, if there is any way to “take over” the console. What I need is basically to be able to output text to the console without this piece of text preceding it.
So instead of:
[11:13:39 INFO] [STDOUT]: [package.name.class...]: Some text
Just the message is not really recommended for anything and you should use the org.slf4j.Logger Logger (see the docs: Logging and Debugging — Sponge 7.2.0 documentation) that prints your plugin name instead of the class of the logging.
I know that with standard output, slf4j is the way to go, but for the proper functionality of my plugin (I will reveal as much that it will be an advanced admin tool), I need to be able to output directly to the console. Is it possible or not?
There’s really no practical reason to do so and there’s probably a simpler way to achieve whatever you are trying to do.
But to answer your question, no this is not possible with Sponge or even Forge directly, however you should be able to strip certain data matching your pluginid using a custom log4j.xml