Souin Souin - 4 months ago 15
Java Question

Eclipse Debug mode : Console output isn't working

I'm working in an enterprise that have an update on their application everyday.

I did an update yesterday because I haven't done it for a while. But there's an huge problem for me, developper, now: the standard output on the Eclipse Console doesn't come anymore after a dozen of lines, and I don't udnerstand why.

Indeed, here's the output when the problem come:

[02/08/2016 10:27:21] Info : Reading /me/test.properties property file
[02/08/2016 10:27:21] Info : Reading /me/test2.properties property file
[02/08/2016 10:27:21] Info : Reading /me/test3.version property file
[02/08/2016 10:27:21] Info : Connection to NamingService on host server with port 14010
-- listing properties --
org.omg.CORBA.ORBInitialPort=4444
org.omg.CORBA.ORBClass=com.sun.corba.se.internal.iiop.ORB
org.omg.CORBA.ORBInitialHost=server
org.omg.CORBA.ORBSingletonClass=com.sun.corba.se.internal.iiop.ORB
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/myDir/myFile.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/myDir2/myFile2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.


And after that, I can't have normal output (and before I don't know but the fact that there is the Date and the hour is a good sign.

For example, if I do a little
System.out.println("Hi")
it's not printed. And believe me, in that project, there's a LOT of Debug output that's supposed to be printed.

If you know why or if you think you can help me,

Thank you, Clément.

Answer

SHORT ANSWER:

You will find your System.out statements redirected into the logs. If not, use log.xxx() instead System.out


LONG ANSWER:

Console output in big apps or company are a common mistake made by junior programmers.

Force console output redirect to logs OR just avoid it via general configuration it is an usual behaviour. A lot of companies (like mine) avoid output per console to force developers to write / read all application messages via logs.

This avoid

  • bad programming techniques
  • lose of log info when running in production

DISCLAIMER: I should check log4j configuration to be sure.