You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by GitBox <gi...@apache.org> on 2022/11/04 09:05:13 UTC

[GitHub] [jackrabbit-oak] tihom88 commented on a diff in pull request #743: OAK-9982: avoid direct use of Json.createObject

tihom88 commented on code in PR #743:
URL: https://github.com/apache/jackrabbit-oak/pull/743#discussion_r1013770841


##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/async/ElasticResultRowAsyncIterator.java:
##########
@@ -253,9 +252,8 @@ class ElasticQueryScanner {
                     }
             );
 
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Kicking initial search for query {}", ElasticIndexUtils.toString(searchReq));
-            }
+
+            LOG.trace("Kicking initial search for query {}", searchReq);

Review Comment:
   I think we should keep these if conditions, as we will rarely enable these trace logs and parameter evaluation will happen for almost everything though it is not being logged.
   https://logging.apache.org/log4j/1.2/manual.html#performance
   



##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/async/ElasticResultRowAsyncIterator.java:
##########
@@ -363,9 +361,7 @@ private void scan() {
                         .highlight(highlight)
                         .size(getFetchSize(requests++))
                 );
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace("Kicking new search after query {}", ElasticIndexUtils.toString(searchReq));
-                }
+                LOG.trace("Kicking new search after query {}", searchReq);

Review Comment:
   same as above.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org