Skip to content

Commit

Permalink
Disabling start of get request log
Browse files Browse the repository at this point in the history
  • Loading branch information
hiteshk25 committed Nov 29, 2023
1 parent 32326bc commit 31660fd
Showing 1 changed file with 19 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -404,23 +404,25 @@ public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throw
rb.isDistrib = isDistrib(req);
tagRequestWithRequestId(rb);

if (isShard) {
// log a simple message on start
log.info("Start Forwarded Search Query");
SolrParams filteredParams = removeVerboseParams(req.getParams());
rsp.getToLog()
.asShallowMap(false)
.put("params", "{" + filteredParams + "}"); // replace "params" with the filtered version
} else {
// Then it is the first time this req hitting Solr - not a req distributed by another higher
// level req.
// We have to log the query here as
// 1. It's useful to know the query before the processing start in case if the query stalls
// 2. The existing logging in SolrCore does not contain the query as query construction
// happens after the log
// entries are added to rsp.toLog
if (log.isInfoEnabled()) {
log.info("Start External Search Query: {}", req.getParamString());
if (req.getPath().contains("select")) {
if (isShard) {
// log a simple message on start
log.info("Start Forwarded Search Query");
SolrParams filteredParams = removeVerboseParams(req.getParams());
rsp.getToLog()
.asShallowMap(false)
.put("params", "{" + filteredParams + "}"); // replace "params" with the filtered version
} else {
// Then it is the first time this req hitting Solr - not a req distributed by another higher
// level req.
// We have to log the query here as
// 1. It's useful to know the query before the processing start in case if the query stalls
// 2. The existing logging in SolrCore does not contain the query as query construction
// happens after the log
// entries are added to rsp.toLog
if (log.isInfoEnabled()) {
log.info("Start External Search Query: {}", req.getParamString());
}
}
}

Expand Down

0 comments on commit 31660fd

Please sign in to comment.