Fixing the logging statements.

This commit is contained in:
Sahil Palvia 2018-03-05 11:09:26 -08:00
parent c070bec86e
commit 4826fd6a6f

View file

@ -1327,14 +1327,14 @@ public class Worker implements Runnable {
builder.withClientConfiguration(clientConfiguration); builder.withClientConfiguration(clientConfiguration);
} }
if (StringUtils.isNotEmpty(endpointUrl)) { if (StringUtils.isNotEmpty(endpointUrl)) {
LOG.warn("Received configuration for both region name as " + region + ", and endpoint as " LOG.warn("Received configuration for endpoint as " + endpointUrl + ", and region as "
+ endpointUrl + ". Client endpoint will overwrite region name."); + region + ".");
builder.withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(endpointUrl, region)); builder.withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(endpointUrl, region));
} else if (StringUtils.isNotEmpty(region)) { } else if (StringUtils.isNotEmpty(region)) {
LOG.debug("The region for the client has been set to " + region); LOG.warn("Received configuration for region as " + region + ".");
builder.withRegion(region); builder.withRegion(region);
} else { } else {
LOG.debug("Endpoint URL and region are not set, setting region to us-east-1"); LOG.warn("No configuration received for endpoint and region, will default region to us-east-1");
builder.withRegion(Regions.US_EAST_1); builder.withRegion(Regions.US_EAST_1);
} }
return (AmazonWebServiceClient) builder.build(); return (AmazonWebServiceClient) builder.build();