Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Forked Jetty: complete logging?

You seem to be using the default logging of letting Jetty use its internal StdErrLog, and then the System.out and System.err routing to a rolling file.

Jenkins is likely getting in the way at the System.out and System.err rerouting part.

At this point, I'd recommend you configure Jetty to use a more formal logging framework.
Something like Slf4J or java.util.logging.

Here's some help in how Jetty Logging works and is configured, with specifics for StdErrLog

We also have a few examples for Slf4J that are documented at

Joakim Erdfelt <joakim@xxxxxxxxxxx>
Developer advice, services and support
from the Jetty & CometD experts -

On Tue, Nov 6, 2012 at 7:17 AM, Fhomasp <thomas.peeters1@xxxxxxxxxx> wrote:
I've got this problem with starting a forked jetty using the
jetty-maven-plugin.  The problem only occurs when done by a Jenkins job.
When we execute the Maven command manually (on a server or local machine) we
cannot reproduce the problem because the forked jetty simply works.

This Jenkins job uses the same settings, environments, commands as when we
run the job manually using Maven3.

I adjusted the logging by configuring it in a jetty.xml file, but when the
server isn't working because of the Jenkins run there's only a very small
entry in the log files which tells us absolutely nothing.  I want to know
why the server isn't getting up, preferably by decent logging.
When we start the job in Jenkins but *don't use* a forked jetty there is no

<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC &quot;-//Jetty//Configure//EN&quot;
<Configure class="org.eclipse.jetty.server.Server">
    <Call name="addConnector">
                <Set name="port">8282</Set>
                <Set name="confidentialPort">1123</Set>
                <Set name="integralPort">1124</Set>

    <New id="ServerLog" class="">
            <New class="org.eclipse.jetty.util.RolloverFileOutputStream">
                <Arg><SystemProperty name="jetty.home"
                <Arg type="boolean">false</Arg>
                <Arg type="int">90</Arg>
                <Arg><Call class="java.util.TimeZone"
                <Get id="ServerLogName" name="datedFilename"/>

    <Call class="org.eclipse.jetty.util.log.Log"
name="info"><Arg>Redirecting stderr/stdout to <Ref
    <Call class="java.lang.System" name="setErr"><Arg><Ref
    <Call class="java.lang.System" name="setOut"><Arg><Ref

    <Set name="handler">
        <New id="Handlers"
            <Set name="handlers">
                <Array type="org.eclipse.jetty.server.Handler">
                        <New id="Contexts"
                        <New id="DefaultHandler"
                        <New id="RequestLog"
    <Ref id="RequestLog">
        <Set name="requestLog">
            <New id="RequestLogImpl"
                <Arg><SystemProperty name="jetty.logs"
                <Set name="retainDays">90</Set>
                <Set name="append">true</Set>
                <Set name="extended">true</Set>
                <Set name="LogTimeZone">GMT</Set>






                            <jvmArgs>-Denv=${env} -e -X</jvmArgs>

Any input is welcome :-)

View this message in context:
Sent from the Jetty User mailing list archive at
jetty-users mailing list

Back to the top