lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dyer, James" <James.D...@ingramcontent.com>
Subject RE: Service Unavailable exceptions not logged
Date Tue, 30 Oct 2012 19:15:50 GMT
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:tomasflobbe@gmail.com]
Sent: Tuesday, October 30, 2012 1:55 PM
To: dev@lucene.apache.org
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
Mime
View raw message