JBoss Community

Re: JBoss Developer Studio 5 - console log output gone with "Run as Java Application" and using org.apache.commons.logging.LogFactory

created by b.b. in JBoss Tools - View the full discussion

Hello,

 

the console output view *does* show up if the program is printing to the console.

 

a basic java main with a system.out.println("bla blah"); works also for me.

 

org.apache.log4j.Logger Objects work also for me.

 

What das not work for me and my team are Logger Objects of Type:

 

org.apache.commons.logging.Log;

org.apache.commons.logging.LogFactory;

 

What works and produces console output is usage of:

 

org.apache.log4j.Logger log = Logger.getLogger(LogTest.class);

 

What does not work and does not produce any output is usage of:

 

org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(LogTest.class);

 

...

                    log.info("ellou?");

                    log.debug("hu?");

                    log.error("eidonwonnadodat!");

...

 

As we do not want to redefine all logger item definitions directly to log4j classes and this behavior remains with jbdevstudio versions > 4 independent of what Java version or OSX Version, we assume it has to do with jbdevstudio.

 

Ah, did I mention OSX?

 

:)

Reply to this message by going to Community

Start a new discussion in JBoss Tools at Community