JoaoJandre commented on code in PR #11188:
URL: https://github.com/apache/cloudstack/pull/11188#discussion_r2204916774


##########
server/src/main/java/com/cloud/api/ApiServer.java:
##########
@@ -626,7 +626,7 @@ public String handleRequest(final Map params, final String 
responseType, final S
                     for (final  Object key : params.keySet()) {
                         final String keyStr = (String)key;
                         final String[] value = (String[])params.get(key);
-                        logger.trace("   key: " + keyStr + ", value: " + 
((value == null) ? "'null'" : value[0]));
+                        logger.trace("   key: {}, value: {}", keyStr, (value 
== null) ? "'null'" : value[0]);

Review Comment:
   ```suggestion
                           logger.trace("   key: {}, value: {}", keyStr, () -> 
(value == null) ? "'null'" : value[0]);
   ```
   Since this is on trace (rarely used) It would be better to pass a lambda 
function that will me evaluated only if trace is on.



##########
server/src/main/java/com/cloud/api/ApiServer.java:
##########
@@ -1011,7 +1011,7 @@ public boolean verifyRequest(final Map<String, Object[]> 
requestParameters, fina
 
             // if api/secret key are passed to the parameters
             if ((signature == null) || (apiKey == null)) {
-                logger.debug("Expired session, missing signature, or missing 
apiKey -- ignoring request. Signature: " + signature + ", apiKey: " + apiKey);
+                logger.debug("Expired session, missing signature, or missing 
apiKey -- ignoring request. Signature: {}, apiKey: {}", signature, apiKey);

Review Comment:
   If we are changing this, maybe we should set it as warn?



-- 
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: commits-unsubscr...@cloudstack.apache.org

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

Reply via email to