Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


It is possible to redirect all output sent to stderr and stdout to a file that
can be rolled over. This can be configured in jetty.xml as follows:

Code Block
    <New id="ServerLog" class="">
        <New class="org.mortbay.util.RolloverFileOutputStream">
          <Arg><Property name="hamachi.home" default="."/>/<Property name="hamachi.node" default="i2"/>/log/yyyy_mm_dd.server.log</Arg>
          <Arg type="boolean">true</Arg>Arg><!--append-->
          <Arg type="int">90</Arg>
Arg><!--retain days-->
         <Get id="ServerLogName" name="datedFilename"/>

    <Call class="org.mortbay.log.Log" name="info"><Arg>Redirecting stderr/stdout to <Ref id="ServerLogName"/></Arg></Call>
    <Call class="java.lang.System" name="setErr"><Arg><Ref id="ServerLog"/></Arg></Call>
    <Call class="java.lang.System" name="setOut"><Arg><Ref id="ServerLog"/></Arg></Call>

Contact the core Jetty developers at
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery