The default Jetty logging implementation writes to STDERR (aka System.err)
via the StdErrLog implementation.

You have 3 choices.

1) Do nothing, and be happy with the default. :-)
2) Enable the options for stderr/stdout redirection logging found in the
${jetty.home}/start.ini (just uncomment the the appropriate
lines<https://github.com/eclipse/jetty.project/blob/jetty-9.0.3.v20130506/jetty-distribution/src/main/resources/start.ini#L109-L115>
)
3) Use a 3rd party logging framework and configure your logging output in
that frameworks perferred way.
 a) like 
log4j<http://www.eclipse.org/jetty/documentation/current/example-logging-log4j.html>
 b) or 
java.util.logging<http://www.eclipse.org/jetty/documentation/current/example-logging-java-util-logging.html>
built
into the JVM
 c) or everything logging framework that can produce logging and is
supported by 
slf4j<http://www.eclipse.org/jetty/documentation/current/example-slf4j-multiple-loggers.html>
 .

If you use any 3rd party libraries, then option #3c will be your best
choice.
If you are going to use JSP then option #3b and #3c are good choices
If you are going to be simple and use servlets you've created and don't
really care do much, then option #2 is probably sufficient.


--
Joakim Erdfelt <[email protected]>
webtide.com <http://www.webtide.com/>
Developer advice, services and support
from the Jetty & CometD experts
eclipse.org/jetty - cometd.org


On Wed, May 29, 2013 at 10:10 AM, O. Olson <[email protected]> wrote:

> Hi,
>
> I am new to Jetty and I just downloaded Jetty 9 for Windows.
> I start it simply on the command line using:
>
> java -jar start.jar
>
> Do the logging messages I see on the command line also get directed
> to a file? I don’t see anything in the logs subdirectory. If no, is there
> someway I can send a copy of these log messages that appear on the
> commandline
> to a file? I am sure it must be some setting, but I have no clue where to
> start.
>
> I looked at
> http://www.eclipse.org/jetty/documentation/current/configuring-logging.htmland
>  it seems to be more about the logging level (warn, info, debug etc. )
> rather than where to redirect/copy the logging messages.
>
> Thank you for your help.
> O. O.
> _______________________________________________
> jetty-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to