public String toString() { return "ShardResponse:{shard="+shard+",shardAddress="+shardAddress +"\n\trequest=" + req +"\n\tresponse=" + rsp + (exception==null ? "" : "\n\texception="+ SolrException.toStr(exception)) +"\n}"; }
public static void log(Logger log, String msg, Throwable e) { log.severe(msg + ':' + toStr(e)); if (e instanceof SolrException) { ((SolrException)e).logged = true; } }
public static void log(Logger log, Throwable e) { log.severe(toStr(e)); if (e instanceof SolrException) { ((SolrException)e).logged = true; } }
public static void log(Logger log, String msg, Throwable e) { String stackTrace = msg + ':' + toStr(e); String ignore = doIgnore(e, stackTrace); if (ignore != null) { log.info(ignore); return; } log.error(stackTrace); }
public static void log(Logger log, Throwable e) { String stackTrace = toStr(e); String ignore = doIgnore(e, stackTrace); if (ignore != null) { log.info(ignore); return; } log.error(stackTrace); }
public static void log(Logger log, String msg, Throwable e) { String stackTrace = msg + ':' + toStr(e); String ignore = doIgnore(e, stackTrace); if (ignore != null) { log.info(ignore); return; } log.error(stackTrace); }
public static void log(Logger log, Throwable e) { String stackTrace = toStr(e); String ignore = doIgnore(e, stackTrace); if (ignore != null) { log.info(ignore); return; } log.error(stackTrace); }
public void close() { try { synchronized(searcherLock) { // it's possible for someone to get a reference via the _searchers queue // and increment the refcount while RefCounted.close() is being called. // we check the refcount again to see if this has happened and abort the close. // This relies on the RefCounted class allowing close() to be called every // time the counter hits zero. if (refcount.get() > 0) return; _searchers.remove(this); } resource.close(); } catch (IOException e) { log.error("Error closing searcher:" + SolrException.toStr(e)); } } };
try { SolrException.logOnce(log, "Error processing \"legacy\" update command", ex); XML.writeXML(output, "result", SolrException.toStr(ex), "status", "1"); } catch (Exception ee) { log.error("Error writing to output stream: " + ee);
searcherLock.wait(); } catch (InterruptedException e) { log.info(SolrException.toStr(e));
rsp.add("exception_during_debug", SolrException.toStr(e));
rsp.add("exception_during_debug", SolrException.toStr(e));
/** * Looks at various Params to determing if any simple Facet Constraint count * computations are desired. * * @see #getFacetQueryCounts * @see #getFacetFieldCounts * @see #getFacetDateCounts * @see FacetParams#FACET * @return a NamedList of Facet Count info or null */ public NamedList getFacetCounts() { // if someone called this method, benefit of the doubt: assume true if (!params.getBool(FacetParams.FACET,true)) return null; NamedList res = new SimpleOrderedMap(); try { res.add("facet_queries", getFacetQueryCounts()); res.add("facet_fields", getFacetFieldCounts()); res.add("facet_dates", getFacetDateCounts()); } catch (Exception e) { SolrException.logOnce(SolrCore.log, "Exception during facet counts", e); res.add("exception", SolrException.toStr(e)); } return res; }
rsp.add("exception_during_debug", SolrException.toStr(e));