Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] How do I change the default logging in an embedded Jetty 7 Server?

Lance,

The clue is that jetty uses its own stderr log by default, but
if you include an slf4j logging system jar onto the classpath,
jetty will use that instead. You can plug in various different
types of logging into slf4j.

See http://www.slf4j.org.

cheers
Jan

On 10/07/10 04:13, Lance Bader wrote:
Following the directions from
http://wiki.eclipse.org/Jetty/Tutorial/Embedding_Jetty, I have
successfully embedded the Jetty server in my application. I implemented
a simple handler that provides a wonderful RESTful web service for
integrating with the rest of the enterprise.  My problem is that the
server is writing its log to STDERR.

In my configuration, there is nothing from the Jetty distribution other
than an aggregated jar file from the Maven repository
(http://mvnrepository.com/artifact/org.eclipse.jetty.aggregate). There
are no contexts, no WAR files, no XML files to configure jetty, and
start is not used.

At the very least, I would like to tell the server to write the log to a
file where I provide the file specification.  At the very best, I would
like to tell the server to call my application's log facility.  I need a
clue.



_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-dev

--
Jan Bartel, Webtide LLC | janb@xxxxxxxxxxx | http://www.webtide.com


Back to the top