Skip to content

Commit

Permalink
Use lambda to create log record
Browse files Browse the repository at this point in the history
Co-authored-by: Raihaan Shouhell <[email protected]>
  • Loading branch information
Dohbedoh and res0nance authored Nov 14, 2024
1 parent b9ad411 commit cc9dfd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/hudson/plugins/ec2/SlaveTemplate.java
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ HashMap<RunInstancesRequest, List<Filter>> makeRunInstancesRequestAndFilters(Ima
}

String subnetId = chooseSubnetId(rotateSubnet);
LOGGER.log(Level.FINE, String.format("Chose subnetId %s", subnetId));
LOGGER.log(Level.FINE, () -> String.format("Chose subnetId %s", subnetId));

InstanceNetworkInterfaceSpecification net = new InstanceNetworkInterfaceSpecification();
if (StringUtils.isNotBlank(subnetId)) {
Expand Down Expand Up @@ -1436,7 +1436,7 @@ private List<EC2AbstractSlave> provisionSpot(Image image, int number, EnumSet<Pr

InstanceNetworkInterfaceSpecification net = new InstanceNetworkInterfaceSpecification();
String subnetId = chooseSubnetId();
LOGGER.log(Level.FINE, String.format("Chose subnetId %s", subnetId));
LOGGER.log(Level.FINE, () -> String.format("Chose subnetId %s", subnetId));
if (StringUtils.isNotBlank(subnetId)) {
net.setSubnetId(subnetId);

Expand Down

0 comments on commit cc9dfd3

Please sign in to comment.