Skip to content

Commit 07e6db0

Browse files
committed
adds some debug logging
1 parent e242aa3 commit 07e6db0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

elastic-utils-lib/src/cmr/elastic_utils/search/es_index.clj

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,15 @@
358358
(defn execute-query
359359
"Executes a query to find concepts. Returns concept id, native id, and revision id."
360360
[context query]
361-
(let [start (System/currentTimeMillis)
361+
(let [caller-info (try
362+
(let [stack-trace (.getStackTrace (Thread/currentThread))
363+
caller (when (> (count stack-trace) 2)
364+
(aget stack-trace 2))]
365+
(when caller
366+
(str (.getClassName caller) "/" (.getMethodName caller) ":" (.getLineNumber caller))))
367+
(catch Exception _ "unknown"))
368+
_ (info "execute-query called from:" caller-info "for concept-type:" (:concept-type query))
369+
start (System/currentTimeMillis)
362370
e-results (if (granule-match-none? query)
363371
(do
364372
(info "This is a granule search with MatchNone condition, skip querying ES.")

0 commit comments

Comments
 (0)