Redirecting jME logging

I am running a few sample jME applications (taken from the “Hello …” tutorials in the wiki) and notice the following STDOUT/STDERR console output:

Feb 10, 2014 8:42:40 AM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.x
Feb 10, 2014 8:42:40 AM com.jme3.system.Natives extractNativeLibs
INFO: Extraction Directory: /home/zharvey/relay/workbench/eclipse-juno/workspace/zuluverse
Feb 10, 2014 8:42:41 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Lwjgl 2.9.0 context running on thread LWJGL Renderer Thread
Feb 10, 2014 8:42:41 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Adapter: null

I am wondering if it is possible to redirect logging output. I prefer to use SLF4J and usually a Log4j binding in all of my Java projects.

I suppose I could just overwrite System.out and System.err but didn’t know if there was a better/more-standard-practice way of doing this. Thanks in advance!

http://docs.oracle.com/javase/7/docs/api/java/util/logging/Logger.html

2 Likes

Thanks @normen - does jME use JUL (Java Utilstils Logging)? If so, why am I seeing STDOUT/STDERR output? Is jME’s JUL configured to use STDOUT/STDERR? Thanks again!

Yes. The default java logger is configured to use stdout/err, else why would you log?

Awesome, thanks!