The correctness of access logging (aka request logging) events that undergo
a Async / Continuations context has been fixed in Jetty 9.
The Servlet 3.1 refactor for Jetty 9 allowed for this to be fixed.

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


On Wed, Nov 6, 2013 at 5:38 AM, Ian Clark <[email protected]> wrote:

> 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
>
> _______________________________________________
> 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