[Solved] Logger INFO level appears as ERROR in console

Sponge Build: 1.11.2-6.1.0-BETA-3
Java Version: 1.8.0_131 (Oracle)

I’m using the Logger as recommended in the docs (through @Inject annotation) and when I call logger.info, expecting generic output to STDOUT, everything suddenly screws up and the Logger output goes to STDERR.

For example:

[14:05:50 ERROR] [STDERR]: [some.package.class.Name$1.run(SomeClass.java:100)]: May 09, 
2017 2:05:50 PM tsome.package.class.Name$1 run
INFO: The message itself

Instead of expected:

[14:05:50 INFO]: The message itself

Any ideas what could be causing this?

Without seeing your code, I cannot be sure of this, but I think you are injecting the wrong Logger type. Make sure you have import org.slf4j.Logger in your imports, not import java.util.Logger.

1 Like

Oh, I’ve completely missed that, thanks.

1 Like