Skip to content

Commit 8e4024b

Browse files
Pearl1594dhslove
authored andcommitted
fix logger
1 parent 3a26191 commit 8e4024b

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtGetVmIpAddressCommandWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ private Pair<String, String> getIpAddresses(String output, String macAddress) {
136136
ipv6 = ipPart;
137137
}
138138
}
139-
s_logger.debug(String.format("Found ipv4: %s and ipv6: %s with mac address %s", ipv4, ipv6, macAddress));
139+
logger.debug(String.format("Found ipv4: %s and ipv6: %s with mac address %s", ipv4, ipv6, macAddress));
140140
return new Pair<>(ipv4, ipv6);
141141
}
142142

plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixCleanupVMCommandWrapper.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
import java.util.Iterator;
2121
import java.util.Set;
2222

23-
import org.apache.log4j.Logger;
24-
2523
import com.cloud.agent.api.Answer;
2624
import com.cloud.agent.api.CleanupVMCommand;
2725
import com.cloud.hypervisor.xenserver.resource.CitrixResourceBase;
@@ -34,12 +32,10 @@
3432
@ResourceWrapper(handles = CleanupVMCommand.class)
3533
public class CitrixCleanupVMCommandWrapper extends CommandWrapper<CleanupVMCommand, Answer, CitrixResourceBase> {
3634

37-
private static final Logger s_logger = Logger.getLogger(CitrixCleanupVMCommandWrapper.class);
38-
3935
@Override
4036
public Answer execute(final CleanupVMCommand command, final CitrixResourceBase citrixResourceBase) {
4137
if (citrixResourceBase.isDestroyHaltedVms()) {
42-
s_logger.debug(String.format("Cleanup VM is not needed for host with version %s",
38+
logger.debug(String.format("Cleanup VM is not needed for host with version %s",
4339
citrixResourceBase.getHost().getProductVersion()));
4440
return new Answer(command);
4541
}
@@ -57,7 +53,7 @@ public Answer execute(final CleanupVMCommand command, final CitrixResourceBase c
5753
final VM.Record vmr = vm.getRecord(conn);
5854
if (!Types.VmPowerState.HALTED.equals(vmr.powerState)) {
5955
final String msg = String.format("VM %s is not in %s state", vmName, Types.VmPowerState.HALTED);
60-
s_logger.error(msg);
56+
logger.error(msg);
6157
return new Answer(command, false, msg);
6258
}
6359
if (citrixResourceBase.isRefNull(vmr.residentOn)) {
@@ -74,7 +70,7 @@ public Answer execute(final CleanupVMCommand command, final CitrixResourceBase c
7470

7571
} catch (final Exception e) {
7672
final String msg = String.format("Clean up VM %s fail due to %s", vmName, e);
77-
s_logger.error(msg, e);
73+
logger.error(msg, e);
7874
return new Answer(command, false, e.getMessage());
7975
}
8076
return new Answer(command);

vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ public static String composeCloudNetworkName(String prefix, String vlanId, Strin
300300
String networkName = sb.toString();
301301
if (networkName.length() > 80) {
302302
// the maximum limit for a vSwitch name is 80 chars, applies to both standard and distributed virtual switches.
303-
s_logger.warn(String.format("The network name: %s for the vSwitch %s of type %s, exceeds 80 chars", networkName, vSwitchName, vSwitchType));
303+
LOGGER.warn(String.format("The network name: %s for the vSwitch %s of type %s, exceeds 80 chars", networkName, vSwitchName, vSwitchType));
304304
}
305305
return networkName;
306306
}

0 commit comments

Comments
 (0)