Copilot commented on code in PR #11784:
URL: https://github.com/apache/cloudstack/pull/11784#discussion_r2613229800


##########
server/src/main/java/com/cloud/user/AccountManagerImpl.java:
##########
@@ -2823,11 +2822,11 @@ public UserAccount authenticateUser(final String 
username, final String password
             final Boolean ApiSourceCidrChecksEnabled = 
ApiServiceConfiguration.ApiSourceCidrChecksEnabled.value();
 
             if (ApiSourceCidrChecksEnabled) {
-                logger.debug("CIDRs from which account '" + account.toString() 
+ "' is allowed to perform API calls: " + accessAllowedCidrs);
+                logger.debug("CIDRs from which account '{}' is allowed to 
perform API calls: {}", account, accessAllowedCidrs);
 
                 // Block when is not in the list of allowed IPs
                 if (!NetUtils.isIpInCidrList(loginIpAddress, 
accessAllowedCidrs.split(","))) {
-                    logger.warn("Request by account '" + account.toString() + 
"' was denied since " + loginIpAddress.toString().replace("/", "") + " does not 
match " + accessAllowedCidrs);
+                    logger.warn("Request by account '{}' was denied since {} 
does not match {}", account , loginIpAddress.toString().replace("/", ""), 
accessAllowedCidrs);

Review Comment:
   There's an extra space before the comma after the first placeholder. The 
code has "account ," but it should be "account," for consistent formatting.
   ```suggestion
                       logger.warn("Request by account '{}' was denied since {} 
does not match {}", account, loginIpAddress.toString().replace("/", ""), 
accessAllowedCidrs);
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to