Ignore request URLs in Jetty

I run a Seedless server (and if you have an I2P router with good uptimes, you should too), and it generates A LOT of log entries. I'm sure some people would be interested to know which routers are running a Seedless client or server, but for me it just takes up extra log space and hides the more interesting requests (in my case, any request at all).

I run this site using the Jetty webserver that comes with I2P, So I went looking for a way to stop logging certain request paths, and it turns out that there is a method for doing so. Calling the method is slightly convoluted due to the syntax of the jetty.xml file, but it does make sense... kind of.

Anyway, if you look in the jetty.xml file for your eepsite, you will see a section like
the following which controls the request logging:

<Ref id="RequestLog">
  <Set name="requestLog">
    <New id="RequestLogImpl" class="net.i2p.jetty.I2PRequestLog">
      <Set name="filename">/path/to/eepsite/logs/yyyy_mm_dd.request.log</Set>
      <Set name="filenameDateFormat">yyyy_MM_dd</Set>
      <Set name="retainDays">90</Set>
      <Set name="append">true</Set>
      <Set name="extended">false</Set>
      <Set name="logCookies">false</Set>
      <Set name="LogTimeZone">GMT</Set>
    </New>
  </Set>
</Ref>

To prevent logging of the Seedless-related paths, a new setter method  is inserted at the end as follows:

      <Set name="logCookies">false</Set>
      <Set name="LogTimeZone">GMT</Set>
      <Set name="IgnorePaths">
        <Array type="java.lang.String">
          <Item>/Seedless/index.jsp</Item>
          <Item>/Seedless/seedless</Item>
        </Array>
      </Set>
    </New>
  </Set>
</Ref>

Then just restart your I2P router! If you want to ignore other request paths, simply add extra Item sections below the Seedless ones. Note that the ignore paths have are matched in their entirety, so for example, /Seedless/ won't be matched by the above (but the Seedless servers that cause all the spam fetch /Seedless/index.jsp). /Seedless/search won't be matched as well, but that is more interesting to log ^_^