hi,
I have a problem in that in all my logs the response code 200 is logged even if a HTTP request eventually fails with say a 50x response. Currently I'm using the normal NCSARequestLog class like so:-
<Ref id="RequestLog">
<Set name="requestLog">
<New id="RequestLogImpl" class="org.eclipse.jetty.server.NCSARequestLog">
<Set name="filename"><Property name="jetty.home" default="."/>/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>
And in processing request we create a continuation and suspend the request.
final AsyncContinuation continuation = (AsyncContinuation) ContinuationSupport.getContinuation(request);
continuation.setTimeout(CONTINUATION_TIMEOUT);
// suspend the request
continuation.suspend(response); // response may be wrapped.
and so forth. I assume because the request is suspended and continuation takes over, is why the log only shows 200 responses. Are there any utilities in jetty to also log these continued request/responses?
Any help much appreciated.
Ian