Skip to content

Commit b4e7ae7

Browse files
Update core/src/main/java/com/cloud/resource/ServerResourceBase.java
Co-authored-by: dahn <daan.hoogland@gmail.com>
1 parent f8c2ec6 commit b4e7ae7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

core/src/main/java/com/cloud/resource/ServerResourceBase.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,14 @@ private void checkForPrivateInterfaceDefinedByIp(Map<String, Object> params) {
125125
InetAddress rawAddr = InetAddress.getByAddress(InetAddress.getByName(ifAddr).getAddress());
126126
final NetworkInterface nic = NetworkInterface.getByInetAddress(rawAddr);
127127
if (nic != null) {
128-
logger.info(String.format("Using NIC [%s] as private NIC. Source: InterfaceAddress [%s]", nic, ifAddr));
128+
logger.info("Using NIC [{}] as private NIC. Source: InterfaceAddress [{}]", nic, ifAddr);
129129
privateNic = nic;
130130
} else {
131-
logger.info(String.format("Unable to found private NIC with defined ip [%s]", ifAddr));
131+
logger.info("Unable to found private NIC with defined ip [{}]", ifAddr);
132132
}
133-
} catch (Throwable e) {
133+
} catch (Exception e) {
134134
// Logging only, if this method was unable to find a valid interface, iteration will be tested
135-
logger.info(String.format("Unable to use private address to get the management interface: [%s]", e.getMessage()));
135+
logger.info("Unable to use private address to get the management interface: [{}]", e.getMessage());
136136
}
137137
}
138138
}

0 commit comments

Comments
 (0)