Skip to content

Commit

Permalink
Remove some redundant isDebugEnabled() checks
Browse files Browse the repository at this point in the history
SLF4J already performs these checks.
  • Loading branch information
dtrebbien committed Nov 6, 2017
1 parent f7d01cb commit b6c97d9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ public StaticClusterResolver(String region, T... eurekaEndpoints) {
public StaticClusterResolver(String region, List<T> eurekaEndpoints) {
this.eurekaEndpoints = eurekaEndpoints;
this.region = region;
if (logger.isDebugEnabled()) {
logger.debug("Fixed resolver configuration: {}", eurekaEndpoints);
}
logger.debug("Fixed resolver configuration: {}", eurekaEndpoints);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ private List<AwsEndpoint> getClusterEndpointsFromConfig() {
}
}

if (logger.isDebugEnabled()) {
logger.debug("Config resolved to {}", endpoints);
}
logger.debug("Config resolved to {}", endpoints);

if (endpoints.isEmpty()) {
logger.error("Cannot resolve to any endpoints from provided configuration: {}", serviceUrls);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ public List<AwsEndpoint> getClusterEndpoints() {
Collections.reverse(randomizedList);
}

if (logger.isDebugEnabled()) {
logger.debug("Local zone={}; resolved to: {}", myZone, randomizedList);
}
logger.debug("Local zone={}; resolved to: {}", myZone, randomizedList);

return randomizedList;
}
Expand Down

0 comments on commit b6c97d9

Please sign in to comment.