Maybe we could just create a second entry in the ErrorCode enum for 503, say, "SERVICE_UNAVAILABLE_NOT_LOGGED" and change PingRequestHandler to throw exceptions with this new ErrorCode...
James Dyer E-Commerce Systems Ingram Content Group (615) 213-4311 From: Tomás Fernández Löbbe [mailto:[email protected]] Sent: Tuesday, October 30, 2012 2:32 PM To: [email protected] Subject: Re: Service Unavailable exceptions not logged Hmmm I see. The problem I'm having is that with SolrCloud, in the case of no available nodes for a shard the created exception is a 503, and this is something I would like to see logged. Maybe that exception code should be changed? On Tue, Oct 30, 2012 at 4:15 PM, Dyer, James <[email protected]<mailto:[email protected]>> wrote: This was done with https://issues.apache.org/jira/browse/SOLR-2124 . The idea is that it is enough to get a 1-line log whenever PingRequestHandler is hit (which will have the response code). There is no need to also log a severe exception with a stack trace as this is not really an error condition. So if you use PingRequestHandler to take nodes out of a load balancer rotation, it won't create huge logs. James Dyer E-Commerce Systems Ingram Content Group (615) 213-4311 From: Tomás Fernández Löbbe [mailto:[email protected]<mailto:[email protected]>] Sent: Tuesday, October 30, 2012 1:55 PM To: [email protected]<mailto:[email protected]> Subject: Service Unavailable exceptions not logged Why are service unavailable exceptions not logged? In the SolrException class, these error codes are specifically skipped from logging, but I don't understand why. This is the 'log' method of the SolrException class: public static void log(Logger log, Throwable e) { if (e instanceof SolrException && ((SolrException) e).code() == ErrorCode.SERVICE_UNAVAILABLE.code) { return; } String stackTrace = toStr(e); String ignore = doIgnore(e, stackTrace); if (ignore != null) { log.info<http://log.info>(ignore); return; } log.error(stackTrace); } Tomás
