Printing jetty output to Eclipse console window -
i developing eclipse plugin includes starting embedded jetty server, i.e.
server jetty = new server(8080); webappcontext webapp = new webappcontext("webapp", "/webapp"); webapp.setwar("path/to/webapp); jetty.sethandler(webapp); jetty.start(); program.launch("http://localhost:8080/webapp");
i see jetty's output in console window of eclipse contains plugin. instead jetty's output appears in eclipse developing plugin.
look logging framework of jetty.
start creating custom org.eclipse.jetty.util.log.logger
can write eclipse console window of choice.
example implementations:
- the default strerrlog.java used jetty itself.
- the slf4jlog.java using slf4j logging jetty.
- the javautillog.java using java.util.logging jetty.
then, before instantiate jetty classes, call org.eclipse.jetty.util.log.log.setlog(logger log)
set underlying logging framework jetty uses custom logger implementation.
good luck