Tomcat STDOUT as Error in Eclipse

Viewed 5547

I am configuring Tomcat (5.5) server in Eclipse (3.3.2). Once I add Tomcat and start it, the output is printed in Eclipse Console. This output is printed in RED indicating its Standard Error. Although the server gets started without any error the normal INFO is also marked as error.

Jul 29, 2010 7:06:14 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_10\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jdk1.5.0_10\bin\..\jre\bin\client;C:\Program Files\Java\jdk1.5.0_10\bin\..\jre\bin;C:\Program Files\CollabNet Subversion Client;C:\Program Files\Java\jdk1.5.0_10\bin;C:\Program Files\Java\jre1.5.0_07\bin;C:\Program Files\Oracle\Oracle9i\9201\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Sybase125\OCS-12_5\bin;C:\Program Files\Sybase125\OCS-12_5\dll;C:\Program Files\Sybase125\OLEDB;C:\Program Files\Rational\ClearCase\bin;C:\Program Files\Ubsw\Wire\Core;Z:\ZUR_GCOMP_DOC\Project_Trust\datamodel\scripts\GC_trust\Release\1.36\01-DDL;K:\scripts\;C:\Program Files\Ubsw\Wire\Core\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Windows Imaging\;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\apache-maven-2.2.1\bin;C:\Program Files\apache-ant-1.7.0\bin;C:\Viral\Tech\Java\javadb/bin;C:\Program Files\JAD
Jul 29, 2010 7:06:15 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jul 29, 2010 7:06:15 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1187 ms
Jul 29, 2010 7:06:15 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 29, 2010 7:06:15 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.30
Jul 29, 2010 7:06:15 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jul 29, 2010 7:06:15 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 29, 2010 7:06:15 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jul 29, 2010 7:06:15 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/110  config=null
Jul 29, 2010 7:06:15 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jul 29, 2010 7:06:15 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 922 ms

Can anyone let me know how to overcome this and change the output back to BLACK as STDOUT?

5 Answers

Yep, the java.util.logging.ConsoleHandler publishes to System.err (and not to the System.out)...

A workaround that does not involve coding, or just masking any possible error in black is to add to the VM arguments in the eclipse launch configuration:

 -Djava.util.logging.config.file="${workspace_loc}\Servers\Tomcat v8.5 Server at localhost-config\logging.properties"

(adjust the server config folder accordingly)

and create the logging.properties with:

.level=WARNING

This way only problems or potential problems will show in the console, but in red, the fitting color.

Related