Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions server/src/main/java/com/cloud/api/ApiServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -461,14 +461,14 @@ public boolean start() {

final Long snapshotLimit = ConcurrentSnapshotsThresholdPerHost.value();
if (snapshotLimit == null || snapshotLimit <= 0) {
logger.debug("Global concurrent snapshot config parameter " + ConcurrentSnapshotsThresholdPerHost.value() + " is less or equal 0; defaulting to unlimited");
logger.debug("Global concurrent snapshot config parameter {} is less or equal 0; defaulting to unlimited", ConcurrentSnapshotsThresholdPerHost.value());
} else {
dispatcher.setCreateSnapshotQueueSizeLimit(snapshotLimit);
}

final Long migrationLimit = VolumeApiService.ConcurrentMigrationsThresholdPerDatastore.value();
if (migrationLimit == null || migrationLimit <= 0) {
logger.debug("Global concurrent migration config parameter " + VolumeApiService.ConcurrentMigrationsThresholdPerDatastore.value() + " is less or equal 0; defaulting to unlimited");
logger.debug("Global concurrent migration config parameter {} is less or equal 0; defaulting to unlimited", VolumeApiService.ConcurrentMigrationsThresholdPerDatastore.value());
} else {
dispatcher.setMigrateQueueSizeLimit(migrationLimit);
}
Expand Down Expand Up @@ -647,7 +647,7 @@ public String handleRequest(final Map params, final String responseType, final S
logValue = (value == null) ? "'null'" : value[0];
}

logger.trace(" key: " + keyStr + ", value: " + logValue);
logger.trace(" key: {}, value: {}", keyStr, logValue);
}
}
throw new ServerApiException(ApiErrorCode.UNSUPPORTED_ACTION_ERROR, "Invalid request, no command sent");
Expand Down Expand Up @@ -707,7 +707,7 @@ public String handleRequest(final Map params, final String responseType, final S
buf.append(obj.getUuid());
buf.append(" ");
}
logger.info("PermissionDenied: " + ex.getMessage() + " on objs: [" + buf + "]");
logger.info("PermissionDenied: {} on objs: [{}]", ex.getMessage(), buf);
} else {
logger.info("PermissionDenied: {}", ex.getMessage());
}
Expand Down Expand Up @@ -1035,7 +1035,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.warn("Expired session, missing signature, or missing apiKey -- ignoring request. Signature: {}, apiKey: {}", signature, apiKey);
return false; // no signature, bad request
}

Expand Down Expand Up @@ -1258,7 +1258,7 @@ public ResponseObject loginUser(final HttpSession session, final String username
float offsetInHrs = 0f;
if (timezone != null) {
final TimeZone t = TimeZone.getTimeZone(timezone);
logger.info("Current user logged in under " + timezone + " timezone");
logger.info("Current user logged in under {} timezone", timezone);

final java.util.Date date = new java.util.Date();
final long longDate = date.getTime();
Expand Down Expand Up @@ -1410,9 +1410,9 @@ private void checkCommandAvailable(final User user, final String commandName, fi
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.toString(), accessAllowedCidrs);
if (!NetUtils.isIpInCidrList(remoteAddress, accessAllowedCidrs.split(","))) {
logger.warn("Request by account '" + account.toString() + "' was denied since " + remoteAddress + " does not match " + accessAllowedCidrs);
logger.warn("Request by account '{}' was denied since {} does not match {}", account.toString(), remoteAddress, accessAllowedCidrs);
throw new OriginDeniedException("Calls from disallowed origin", account, remoteAddress);
}
}
Expand Down
Loading