exceptionfactory commented on a change in pull request #4892:
URL: https://github.com/apache/nifi/pull/4892#discussion_r593394000



##########
File path: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java
##########
@@ -839,22 +822,14 @@ public void onTrigger(ProcessContext context, 
ProcessSession session) throws Pro
         final int maxAttributeSize = 
context.getProperty(PROP_PUT_ATTRIBUTE_MAX_LENGTH).asInteger();
         final ComponentLog logger = getLogger();
 
-        // log ETag cache metrics
-        final boolean eTagEnabled = 
context.getProperty(PROP_USE_ETAG).asBoolean();
-        if (eTagEnabled && logger.isDebugEnabled()) {
-            final Cache cache = okHttpClient.cache();
-            logger.debug("OkHttp ETag cache metrics :: Request Count: {} | 
Network Count: {} | Hit Count: {}",
-                    new Object[]{cache.requestCount(), cache.networkCount(), 
cache.hitCount()});
-        }
-

Review comment:
       This block of code is difficult to unit test since it relies on enabling 
debug logging.  Although it might be interesting for some specific scenarios, 
it seems like it would be better to rely on enabling logging for OkHttp itself 
as opposed to logging cache metrics using this approach.




----------------------------------------------------------------
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.

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


Reply via email to