I can not see output on the console in project with Wildfly

1

I can not see any output on the console in a project with Wildfly 8.0.0.

If at any point in my code I make a System.out.println("Qualquer coisa") simply nothing appears on my Eclipse Kepler console.

The same project running with Apache Tomcat 7 generates output on the console with no problem.

What can it be?

    
asked by anonymous 04.06.2014 / 19:43

1 answer

2

Application servers are a little more complex, and they use loggers for this. The default output is not the same as a desktop app, for example. For you to properly see this log you should use something like:

import java.util.logging.Logger;
...

private static final Logger log = Logger.getLogger(SuaClasse.class.getName());

After that it's simple:

log.info("Mensagem");
log.warning("Mensagem");
log.severe("Mensagem");
log...

You will now have your logs in the IDE console, you can also look at the log file inside the server in the /standalone/log/server.log

Hugs

    
05.06.2014 / 13:46