I would assume that there is some subclass of IOException thrown in the
cases where the client disconnects. So we could ignore just those?

Carsten

Am 30.07.15 um 17:58 schrieb Bertrand Delacretaz:
> Hi,
> 
> Since SLING-3498 the SlingMainServlet.service method does this:
> 
>   try {
>      ...do request processing
>    } catch (IOException ioe) {
>       log.debug("service: Probably client aborted request or any other
> network problem", ioe);
>    } catch (Throwable T) {
>       log.error(...
> 
> The idea was to avoid polluting the logs with IOException caused by
> clients disconnecting prematurely or other network issues.
> 
> The problem is that this causes legit IOExceptions throwed by request
> processing code to be logged at the debug level only, so effectively
> hidden on production systems.
> 
> What do people think of changing that catch clause to
> 
>    } catch (IOException ioe) {
>       log.error("service: IOException in request processing", ioe);
> 
> I think a bit of noise in the logs is better than hiding exceptions
> thrown by application code.
> 
> Any better ideas?
> 
> -Bertrand
> 


-- 
Carsten Ziegeler
Adobe Research Switzerland
[email protected]

Reply via email to