cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [25/36] git commit: updated refs/heads/master to cd7218e
Date Sat, 29 Aug 2015 20:06:22 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/hypervisors/ovm3/src/main/java/com/cloud/ha/Ovm3Investigator.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/main/java/com/cloud/ha/Ovm3Investigator.java b/plugins/hypervisors/ovm3/src/main/java/com/cloud/ha/Ovm3Investigator.java
index f9e88c0..3636290 100644
--- a/plugins/hypervisors/ovm3/src/main/java/com/cloud/ha/Ovm3Investigator.java
+++ b/plugins/hypervisors/ovm3/src/main/java/com/cloud/ha/Ovm3Investigator.java
@@ -22,7 +22,6 @@ import java.util.List;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
 
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.Answer;
@@ -37,7 +36,6 @@ import com.cloud.utils.component.AdapterBase;
 
 @Local(value = Investigator.class)
 public class Ovm3Investigator extends AdapterBase implements Investigator {
-    private static final Logger LOGGER = Logger.getLogger(Ovm3Investigator.class);
     @Inject
     HostDao hostDao;
     @Inject
@@ -47,7 +45,7 @@ public class Ovm3Investigator extends AdapterBase implements Investigator {
 
     @Override
     public boolean isVmAlive(com.cloud.vm.VirtualMachine vm, Host host) throws UnknownVM {
-        LOGGER.debug("isVmAlive: " + vm.getHostName() + " on " + host.getName());
+        logger.debug("isVmAlive: " + vm.getHostName() + " on " + host.getName());
         if (host.getHypervisorType() != Hypervisor.HypervisorType.Ovm3) {
             throw new UnknownVM();
         }
@@ -60,7 +58,7 @@ public class Ovm3Investigator extends AdapterBase implements Investigator {
 
     @Override
     public Status isAgentAlive(Host agent) {
-        LOGGER.debug("isAgentAlive: " + agent.getName());
+        logger.debug("isAgentAlive: " + agent.getName());
         if (agent.getHypervisorType() != Hypervisor.HypervisorType.Ovm3) {
             return null;
         }
@@ -76,7 +74,7 @@ public class Ovm3Investigator extends AdapterBase implements Investigator {
                     return answer.getResult() ? Status.Down : Status.Up;
                 }
             } catch (Exception e) {
-                LOGGER.error("Failed to send command to host: " + neighbor.getId(), e);
+                logger.error("Failed to send command to host: " + neighbor.getId(), e);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3Discoverer.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3Discoverer.java b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3Discoverer.java
index 5dab20a..83f8ccd 100755
--- a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3Discoverer.java
+++ b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3Discoverer.java
@@ -30,7 +30,6 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
-import org.apache.log4j.Logger;
 
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.Listener;
@@ -68,7 +67,6 @@ import com.cloud.utils.ssh.SSHCmdHelper;
 @Local(value = Discoverer.class)
 public class Ovm3Discoverer extends DiscovererBase implements Discoverer,
         Listener, ResourceStateAdapter {
-    private static final Logger LOGGER = Logger.getLogger(Ovm3Discoverer.class);
     protected String publicNetworkDevice;
     protected String privateNetworkDevice;
     protected String guestNetworkDevice;
@@ -125,11 +123,11 @@ public class Ovm3Discoverer extends DiscovererBase implements Discoverer,
     private boolean CheckUrl(URI url) throws DiscoveryException {
         if ("http".equals(url.getScheme()) || "https".equals(url.getScheme())) {
             String msg = "Discovering " + url + ": " + _params;
-            LOGGER.debug(msg);
+            logger.debug(msg);
         } else {
             String msg = "urlString is not http(s) so we're not taking care of the discovery for this: "
                     + url;
-            LOGGER.info(msg);
+            logger.info(msg);
             throw new DiscoveryException(msg);
         }
         return true;
@@ -144,13 +142,13 @@ public class Ovm3Discoverer extends DiscovererBase implements Discoverer,
         CheckUrl(url);
         if (clusterId == null) {
             String msg = "must specify cluster Id when add host";
-            LOGGER.info(msg);
+            logger.info(msg);
             throw new DiscoveryException(msg);
         }
 
         if (podId == null) {
             String msg = "must specify pod Id when add host";
-            LOGGER.info(msg);
+            logger.info(msg);
             throw new DiscoveryException(msg);
         }
 
@@ -158,30 +156,30 @@ public class Ovm3Discoverer extends DiscovererBase implements Discoverer,
         if (cluster == null
                 || (cluster.getHypervisorType() != HypervisorType.Ovm3)) {
             String msg = "invalid cluster id or cluster is not for Ovm3 hypervisors";
-            LOGGER.info(msg);
+            logger.info(msg);
             throw new DiscoveryException(msg);
         } else {
-            LOGGER.debug("cluster: " + cluster);
+            logger.debug("cluster: " + cluster);
         }
 
         String agentUsername = _params.get("agentusername");
         if (agentUsername == null) {
             String msg = "Agent user name must be specified";
-            LOGGER.info(msg);
+            logger.info(msg);
             throw new DiscoveryException(msg);
         }
 
         String agentPassword = _params.get("agentpassword");
         if (agentPassword == null) {
             String msg = "Agent password must be specified";
-            LOGGER.info(msg);
+            logger.info(msg);
             throw new DiscoveryException(msg);
         }
 
         String agentPort = _params.get("agentport");
         if (agentPort == null) {
             String msg = "Agent port must be specified";
-            LOGGER.info(msg);
+            logger.info(msg);
             throw new DiscoveryException(msg);
         }
 
@@ -195,11 +193,11 @@ public class Ovm3Discoverer extends DiscovererBase implements Discoverer,
 
             if (checkIfExisted(guid)) {
                 String msg = "The host " + hostIp + " has been added before";
-                LOGGER.info(msg);
+                logger.info(msg);
                 throw new DiscoveryException(msg);
             }
 
-            LOGGER.debug("Ovm3 discover is going to disover host having guid "
+            logger.debug("Ovm3 discover is going to disover host having guid "
                     + guid);
 
             ClusterVO clu = clusterDao.findById(clusterId);
@@ -226,7 +224,7 @@ public class Ovm3Discoverer extends DiscovererBase implements Discoverer,
                 String msg = "Cannot Ssh to Ovm3 host(IP=" + hostIp
                         + ", username=" + username
                         + ", password=*******), discovery failed";
-                LOGGER.warn(msg);
+                logger.warn(msg);
                 throw new DiscoveryException(msg);
             }
 
@@ -283,17 +281,17 @@ public class Ovm3Discoverer extends DiscovererBase implements Discoverer,
             resources.put(ovmResource, details);
             return resources;
         } catch (UnknownHostException e) {
-            LOGGER.error(
+            logger.error(
                     "Host name resolve failed exception, Unable to discover Ovm3 host: "
                             + url.getHost(), e);
             return null;
         } catch (ConfigurationException e) {
-            LOGGER.error(
+            logger.error(
                     "Configure resource failed, Unable to discover Ovm3 host: "
                             + url.getHost(), e);
             return null;
         } catch (IOException | Ovm3ResourceException e) {
-            LOGGER.error("Unable to discover Ovm3 host: " + url.getHost(), e);
+            logger.error("Unable to discover Ovm3 host: " + url.getHost(), e);
             return null;
         }
     }
@@ -301,7 +299,7 @@ public class Ovm3Discoverer extends DiscovererBase implements Discoverer,
     @Override
     public void postDiscovery(List<HostVO> hosts, long msId)
             throws CloudRuntimeException {
-        LOGGER.debug("postDiscovery: " + hosts);
+        logger.debug("postDiscovery: " + hosts);
     }
 
     @Override
@@ -317,26 +315,26 @@ public class Ovm3Discoverer extends DiscovererBase implements Discoverer,
     @Override
     public HostVO createHostVOForConnectedAgent(HostVO host,
             StartupCommand[] cmd) {
-        LOGGER.debug("createHostVOForConnectedAgent: " + host);
+        logger.debug("createHostVOForConnectedAgent: " + host);
         return null;
     }
 
     @Override
     public boolean processAnswers(long agentId, long seq, Answer[] answers) {
-        LOGGER.debug("processAnswers: " + agentId);
+        logger.debug("processAnswers: " + agentId);
         return false;
     }
 
     @Override
     public boolean processCommands(long agentId, long seq, Command[] commands) {
-        LOGGER.debug("processCommands: " + agentId);
+        logger.debug("processCommands: " + agentId);
         return false;
     }
 
     @Override
     public AgentControlAnswer processControlCommand(long agentId,
             AgentControlCommand cmd) {
-        LOGGER.debug("processControlCommand: " + agentId);
+        logger.debug("processControlCommand: " + agentId);
         return null;
     }
 
@@ -344,12 +342,12 @@ public class Ovm3Discoverer extends DiscovererBase implements Discoverer,
     @Override
     public void processConnect(Host host, StartupCommand cmd,
             boolean forRebalance) {
-        LOGGER.debug("processConnect");
+        logger.debug("processConnect");
     }
 
     @Override
     public boolean processDisconnect(long agentId, Status state) {
-        LOGGER.debug("processDisconnect");
+        logger.debug("processDisconnect");
         return false;
     }
 
@@ -360,13 +358,13 @@ public class Ovm3Discoverer extends DiscovererBase implements Discoverer,
 
     @Override
     public int getTimeout() {
-        LOGGER.debug("getTimeout");
+        logger.debug("getTimeout");
         return 0;
     }
 
     @Override
     public boolean processTimeout(long agentId, long seq) {
-        LOGGER.debug("processTimeout: " + agentId);
+        logger.debug("processTimeout: " + agentId);
         return false;
     }
 
@@ -374,7 +372,7 @@ public class Ovm3Discoverer extends DiscovererBase implements Discoverer,
     public HostVO createHostVOForDirectConnectAgent(HostVO host,
             StartupCommand[] startup, ServerResource resource,
             Map<String, String> details, List<String> hostTags) {
-        LOGGER.debug("createHostVOForDirectConnectAgent: " + host);
+        logger.debug("createHostVOForDirectConnectAgent: " + host);
         StartupCommand firstCmd = startup[0];
         if (!(firstCmd instanceof StartupRoutingCommand)) {
             return null;
@@ -392,7 +390,7 @@ public class Ovm3Discoverer extends DiscovererBase implements Discoverer,
     @Override
     public DeleteHostAnswer deleteHost(HostVO host, boolean isForced,
             boolean isForceDeleteStorage) throws UnableDeleteHostException {
-        LOGGER.debug("deleteHost: " + host);
+        logger.debug("deleteHost: " + host);
         if (host.getType() != com.cloud.host.Host.Type.Routing
                 || host.getHypervisorType() != HypervisorType.Ovm3) {
             return null;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3FenceBuilder.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3FenceBuilder.java b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3FenceBuilder.java
index c997a58..099d3ad 100755
--- a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3FenceBuilder.java
+++ b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3FenceBuilder.java
@@ -24,7 +24,6 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
-import org.apache.log4j.Logger;
 
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.FenceAnswer;
@@ -43,7 +42,6 @@ import com.cloud.vm.VirtualMachine;
 @Local(value = FenceBuilder.class)
 public class Ovm3FenceBuilder extends AdapterBase implements FenceBuilder {
     Map<String, Object> fenceParams;
-    private static final Logger LOGGER = Logger.getLogger(Ovm3FenceBuilder.class);
     @Inject
     AgentManager agentMgr;
     @Inject
@@ -76,11 +74,11 @@ public class Ovm3FenceBuilder extends AdapterBase implements FenceBuilder {
     @Override
     public Boolean fenceOff(VirtualMachine vm, Host host) {
         if (host.getHypervisorType() != HypervisorType.Ovm3) {
-            LOGGER.debug("Don't know how to fence non Ovm3 hosts "
+            logger.debug("Don't know how to fence non Ovm3 hosts "
                     + host.getHypervisorType());
             return null;
         } else {
-            LOGGER.debug("Fencing " + vm + " on host " + host
+            logger.debug("Fencing " + vm + " on host " + host
                     + " with params: "+ fenceParams );
         }
 
@@ -96,8 +94,8 @@ public class Ovm3FenceBuilder extends AdapterBase implements FenceBuilder {
                 try {
                     answer = (FenceAnswer) agentMgr.send(h.getId(), fence);
                 } catch (AgentUnavailableException | OperationTimedoutException e) {
-                    if (LOGGER.isDebugEnabled()) {
-                        LOGGER.debug("Moving on to the next host because "
+                    if (logger.isDebugEnabled()) {
+                        logger.debug("Moving on to the next host because "
                                 + h.toString() + " is unavailable", e);
                     }
                     continue;
@@ -108,8 +106,8 @@ public class Ovm3FenceBuilder extends AdapterBase implements FenceBuilder {
             }
         }
 
-        if (LOGGER.isDebugEnabled()) {
-            LOGGER.debug("Unable to fence off " + vm.toString() + " on "
+        if (logger.isDebugEnabled()) {
+            logger.debug("Unable to fence off " + vm.toString() + " on "
                     + host.toString());
         }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorGuru.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorGuru.java b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorGuru.java
index 6ec7741..dd1f8b0 100755
--- a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorGuru.java
+++ b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorGuru.java
@@ -25,7 +25,6 @@ import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector;
 import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
 import org.apache.cloudstack.storage.command.CopyCommand;
 import org.apache.cloudstack.storage.command.StorageSubSystemCommand;
-import org.apache.log4j.Logger;
 
 import com.cloud.agent.api.Command;
 import com.cloud.agent.api.to.DataObjectType;
@@ -45,7 +44,6 @@ import com.cloud.vm.VirtualMachineProfile;
 
 @Local(value = HypervisorGuru.class)
 public class Ovm3HypervisorGuru extends HypervisorGuruBase implements HypervisorGuru {
-    private final Logger LOGGER = Logger.getLogger(Ovm3HypervisorGuru.class);
     @Inject
     GuestOSDao guestOsDao;
     @Inject
@@ -86,7 +84,7 @@ public class Ovm3HypervisorGuru extends HypervisorGuruBase implements Hypervisor
      * @see com.cloud.hypervisor.HypervisorGuruBase#getCommandHostDelegation(long, com.cloud.agent.api.Command)
      */
     public Pair<Boolean, Long> getCommandHostDelegation(long hostId, Command cmd) {
-        LOGGER.debug("getCommandHostDelegation: " + cmd.getClass());
+        logger.debug("getCommandHostDelegation: " + cmd.getClass());
         if (cmd instanceof StorageSubSystemCommand) {
             StorageSubSystemCommand c = (StorageSubSystemCommand)cmd;
             c.setExecuteInSequence(true);
@@ -97,7 +95,7 @@ public class Ovm3HypervisorGuru extends HypervisorGuruBase implements Hypervisor
             DataTO destData = cpyCommand.getDestTO();
 
             if (srcData.getObjectType() == DataObjectType.SNAPSHOT && destData.getObjectType() == DataObjectType.TEMPLATE) {
-                LOGGER.debug("Snapshot to Template: " + cmd);
+                logger.debug("Snapshot to Template: " + cmd);
                 DataStoreTO srcStore = srcData.getDataStore();
                 DataStoreTO destStore = destData.getDataStore();
                 if (srcStore instanceof NfsTO && destStore instanceof NfsTO) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockAgentManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockAgentManagerImpl.java b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockAgentManagerImpl.java
index 0eeef82..2337694 100644
--- a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockAgentManagerImpl.java
+++ b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockAgentManagerImpl.java
@@ -34,7 +34,6 @@ import javax.naming.ConfigurationException;
 
 import com.cloud.user.AccountManager;
 import org.apache.cloudstack.context.CallContext;
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.agent.AgentManager;
@@ -74,7 +73,6 @@ import com.cloud.utils.net.NetUtils;
 @Component
 @Local(value = {MockAgentManager.class})
 public class MockAgentManagerImpl extends ManagerBase implements MockAgentManager {
-    private static final Logger s_logger = Logger.getLogger(MockAgentManagerImpl.class);
     @Inject
     HostPodDao _podDao = null;
     @Inject
@@ -110,10 +108,10 @@ public class MockAgentManagerImpl extends ManagerBase implements MockAgentManage
             Long cidrSize = (Long)cidrPair.get(1);
             return new Pair<String, Long>(cidrAddress, cidrSize);
         } catch (PatternSyntaxException e) {
-            s_logger.error("Exception while splitting pod cidr");
+            logger.error("Exception while splitting pod cidr");
             return null;
         } catch (IndexOutOfBoundsException e) {
-            s_logger.error("Invalid pod cidr. Please check");
+            logger.error("Invalid pod cidr. Please check");
             return null;
         }
     }
@@ -178,7 +176,7 @@ public class MockAgentManagerImpl extends ManagerBase implements MockAgentManage
                 txn.commit();
             } catch (Exception ex) {
                 txn.rollback();
-                s_logger.error("Error while configuring mock agent " + ex.getMessage());
+                logger.error("Error while configuring mock agent " + ex.getMessage());
                 throw new CloudRuntimeException("Error configuring agent", ex);
             } finally {
                 txn.close();
@@ -197,7 +195,7 @@ public class MockAgentManagerImpl extends ManagerBase implements MockAgentManage
 
                     newResources.put(agentResource, args);
                 } catch (ConfigurationException e) {
-                    s_logger.error("error while configuring server resource" + e.getMessage());
+                    logger.error("error while configuring server resource" + e.getMessage());
                 }
             }
         }
@@ -210,7 +208,7 @@ public class MockAgentManagerImpl extends ManagerBase implements MockAgentManage
             random = SecureRandom.getInstance("SHA1PRNG");
             _executor = new ThreadPoolExecutor(1, 5, 1, TimeUnit.DAYS, new LinkedBlockingQueue<Runnable>(), new NamedThreadFactory("Simulator-Agent-Mgr"));
         } catch (NoSuchAlgorithmException e) {
-            s_logger.debug("Failed to initialize random:" + e.toString());
+            logger.debug("Failed to initialize random:" + e.toString());
             return false;
         }
         return true;
@@ -298,7 +296,7 @@ public class MockAgentManagerImpl extends ManagerBase implements MockAgentManage
                 try {
                     _resourceMgr.deleteHost(host.getId(), true, true);
                 } catch (Exception e) {
-                    s_logger.debug("Failed to delete host: ", e);
+                    logger.debug("Failed to delete host: ", e);
                 }
             }
         }
@@ -363,12 +361,12 @@ public class MockAgentManagerImpl extends ManagerBase implements MockAgentManage
                     try {
                         _resourceMgr.discoverHosts(cmd);
                     } catch (DiscoveryException e) {
-                        s_logger.debug("Failed to discover host: " + e.toString());
+                        logger.debug("Failed to discover host: " + e.toString());
                         CallContext.unregister();
                         return;
                     }
                 } catch (ConfigurationException e) {
-                    s_logger.debug("Failed to load secondary storage resource: " + e.toString());
+                    logger.debug("Failed to load secondary storage resource: " + e.toString());
                     CallContext.unregister();
                     return;
                 }
@@ -386,7 +384,7 @@ public class MockAgentManagerImpl extends ManagerBase implements MockAgentManage
             if (_host != null) {
                 return _host;
             } else {
-                s_logger.error("Host with guid " + guid + " was not found");
+                logger.error("Host with guid " + guid + " was not found");
                 return null;
             }
         } catch (Exception ex) {
@@ -494,8 +492,8 @@ public class MockAgentManagerImpl extends ManagerBase implements MockAgentManage
 
     @Override
     public Answer checkNetworkCommand(CheckNetworkCommand cmd) {
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Checking if network name setup is done on the resource");
+        if (logger.isDebugEnabled()) {
+            logger.debug("Checking if network name setup is done on the resource");
         }
         return new CheckNetworkAnswer(cmd, true, "Network Setup check by names is done");
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockNetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockNetworkManagerImpl.java b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockNetworkManagerImpl.java
index 0251c0c..53a875f 100644
--- a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockNetworkManagerImpl.java
+++ b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockNetworkManagerImpl.java
@@ -21,7 +21,6 @@ package com.cloud.agent.manager;
 
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
 
 import com.cloud.agent.api.Answer;
 import com.cloud.agent.api.CheckS2SVpnConnectionsCommand;
@@ -60,7 +59,6 @@ import com.cloud.simulator.dao.MockVMDao;
 import com.cloud.utils.component.ManagerBase;
 
 public class MockNetworkManagerImpl extends ManagerBase implements MockNetworkManager {
-    private static final Logger s_logger = Logger.getLogger(MockVmManagerImpl.class);
 
     @Inject
     MockVMDao _mockVmDao;
@@ -123,10 +121,10 @@ public class MockNetworkManagerImpl extends ManagerBase implements MockNetworkMa
     public PlugNicAnswer plugNic(PlugNicCommand cmd) {
         String vmname = cmd.getVmName();
         if (_mockVmDao.findByVmName(vmname) != null) {
-            s_logger.debug("Plugged NIC (dev=" + cmd.getNic().getDeviceId() + ", " + cmd.getNic().getIp() + ") into " + cmd.getVmName());
+            logger.debug("Plugged NIC (dev=" + cmd.getNic().getDeviceId() + ", " + cmd.getNic().getIp() + ") into " + cmd.getVmName());
             return new PlugNicAnswer(cmd, true, "success");
         }
-        s_logger.error("Plug NIC failed for (dev=" + cmd.getNic().getDeviceId() + ", " + cmd.getNic().getIp() + ") into " + cmd.getVmName());
+        logger.error("Plug NIC failed for (dev=" + cmd.getNic().getDeviceId() + ", " + cmd.getNic().getIp() + ") into " + cmd.getVmName());
         return new PlugNicAnswer(cmd, false, "failure");
     }
 
@@ -134,10 +132,10 @@ public class MockNetworkManagerImpl extends ManagerBase implements MockNetworkMa
     public UnPlugNicAnswer unplugNic(UnPlugNicCommand cmd) {
         String vmname = cmd.getVmName();
         if (_mockVmDao.findByVmName(vmname) != null) {
-            s_logger.debug("Plugged NIC (dev=" + cmd.getNic().getDeviceId() + ", " + cmd.getNic().getIp() + ") into " + cmd.getVmName());
+            logger.debug("Plugged NIC (dev=" + cmd.getNic().getDeviceId() + ", " + cmd.getNic().getIp() + ") into " + cmd.getVmName());
             return new UnPlugNicAnswer(cmd, true, "success");
         }
-        s_logger.error("Plug NIC failed for (dev=" + cmd.getNic().getDeviceId() + ", " + cmd.getNic().getIp() + ") into " + cmd.getVmName());
+        logger.error("Plug NIC failed for (dev=" + cmd.getNic().getDeviceId() + ", " + cmd.getNic().getIp() + ") into " + cmd.getVmName());
         return new UnPlugNicAnswer(cmd, false, "failure");
     }
 
@@ -211,7 +209,7 @@ public class MockNetworkManagerImpl extends ManagerBase implements MockNetworkMa
             return new Answer(cmd, true, "success");
         } catch (Exception e) {
             String msg = "Creating guest network failed due to " + e.toString();
-            s_logger.warn(msg, e);
+            logger.warn(msg, e);
             return new Answer(cmd, false, msg);
         }
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java
index a4fc2f9..120cab3 100644
--- a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java
+++ b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java
@@ -31,7 +31,6 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 import org.apache.cloudstack.storage.command.DeleteCommand;
 import org.apache.cloudstack.storage.command.DownloadCommand;
@@ -104,7 +103,6 @@ import com.cloud.vm.DiskProfile;
 @Component
 @Local(value = {MockStorageManager.class})
 public class MockStorageManagerImpl extends ManagerBase implements MockStorageManager {
-    private static final Logger s_logger = Logger.getLogger(MockStorageManagerImpl.class);
     @Inject
     MockStoragePoolDao _mockStoragePoolDao = null;
     @Inject
@@ -1059,7 +1057,7 @@ public class MockStorageManagerImpl extends ManagerBase implements MockStorageMa
                 MessageDigest md = MessageDigest.getInstance("md5");
                 md5 = String.format("%032x", new BigInteger(1, md.digest(cmd.getTemplatePath().getBytes())));
             } catch (NoSuchAlgorithmException e) {
-                s_logger.debug("failed to gernerate md5:" + e.toString());
+                logger.debug("failed to gernerate md5:" + e.toString());
             }
             txn.commit();
             return new Answer(cmd, true, md5);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java
index dbe8ade..bf8a1c1 100644
--- a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java
+++ b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java
@@ -27,7 +27,6 @@ import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
 import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.agent.api.Answer;
@@ -93,7 +92,6 @@ import com.cloud.vm.VirtualMachine.PowerState;
 @Component
 @Local(value = {MockVmManager.class})
 public class MockVmManagerImpl extends ManagerBase implements MockVmManager {
-    private static final Logger s_logger = Logger.getLogger(MockVmManagerImpl.class);
 
     @Inject
     MockVMDao _mockVmDao = null;
@@ -262,12 +260,12 @@ public class MockVmManagerImpl extends ManagerBase implements MockVmManager {
         final MockVm vm = _mockVmDao.findByVmName(router_name);
         final String args = vm.getBootargs();
         if (args.indexOf("router_pr=100") > 0) {
-            s_logger.debug("Router priority is for MASTER");
+            logger.debug("Router priority is for MASTER");
             final CheckRouterAnswer ans = new CheckRouterAnswer(cmd, "Status: MASTER", true);
             ans.setState(VirtualRouter.RedundantState.MASTER);
             return ans;
         } else {
-            s_logger.debug("Router priority is for BACKUP");
+            logger.debug("Router priority is for BACKUP");
             final CheckRouterAnswer ans = new CheckRouterAnswer(cmd, "Status: BACKUP", true);
             ans.setState(VirtualRouter.RedundantState.BACKUP);
             return ans;
@@ -462,7 +460,7 @@ public class MockVmManagerImpl extends ManagerBase implements MockVmManager {
         final String vmName = cmd.getVmName();
         final String vmSnapshotName = cmd.getTarget().getSnapshotName();
 
-        s_logger.debug("Created snapshot " + vmSnapshotName + " for vm " + vmName);
+        logger.debug("Created snapshot " + vmSnapshotName + " for vm " + vmName);
         return new CreateVMSnapshotAnswer(cmd, cmd.getTarget(), cmd.getVolumeTOs());
     }
 
@@ -473,7 +471,7 @@ public class MockVmManagerImpl extends ManagerBase implements MockVmManager {
         if (_mockVmDao.findByVmName(cmd.getVmName()) == null) {
             return new DeleteVMSnapshotAnswer(cmd, false, "No VM by name " + cmd.getVmName());
         }
-        s_logger.debug("Removed snapshot " + snapshotName + " of VM " + vm);
+        logger.debug("Removed snapshot " + snapshotName + " of VM " + vm);
         return new DeleteVMSnapshotAnswer(cmd, cmd.getVolumeTOs());
     }
 
@@ -485,7 +483,7 @@ public class MockVmManagerImpl extends ManagerBase implements MockVmManager {
         if (vmVo == null) {
             return new RevertToVMSnapshotAnswer(cmd, false, "No VM by name " + cmd.getVmName());
         }
-        s_logger.debug("Reverted to snapshot " + snapshot + " of VM " + vm);
+        logger.debug("Reverted to snapshot " + snapshot + " of VM " + vm);
         return new RevertToVMSnapshotAnswer(cmd, cmd.getVolumeTOs(), vmVo.getPowerState());
     }
 
@@ -571,40 +569,40 @@ public class MockVmManagerImpl extends ManagerBase implements MockVmManager {
         boolean updateSeqnoAndSig = false;
         if (currSeqnum != null) {
             if (cmd.getSeqNum() > currSeqnum) {
-                s_logger.info("New seqno received: " + cmd.getSeqNum() + " curr=" + currSeqnum);
+                logger.info("New seqno received: " + cmd.getSeqNum() + " curr=" + currSeqnum);
                 updateSeqnoAndSig = true;
                 if (!cmd.getSignature().equals(currSig)) {
-                    s_logger.info("New seqno received: " + cmd.getSeqNum() + " curr=" + currSeqnum + " new signature received:" + cmd.getSignature() + " curr=" +
+                    logger.info("New seqno received: " + cmd.getSeqNum() + " curr=" + currSeqnum + " new signature received:" + cmd.getSignature() + " curr=" +
                             currSig + ", updated iptables");
                     action = ", updated iptables";
                     reason = reason + "seqno_increased_sig_changed";
                 } else {
-                    s_logger.info("New seqno received: " + cmd.getSeqNum() + " curr=" + currSeqnum + " no change in signature:" + cmd.getSignature() + ", do nothing");
+                    logger.info("New seqno received: " + cmd.getSeqNum() + " curr=" + currSeqnum + " no change in signature:" + cmd.getSignature() + ", do nothing");
                     reason = reason + "seqno_increased_sig_same";
                 }
             } else if (cmd.getSeqNum() < currSeqnum) {
-                s_logger.info("Older seqno received: " + cmd.getSeqNum() + " curr=" + currSeqnum + ", do nothing");
+                logger.info("Older seqno received: " + cmd.getSeqNum() + " curr=" + currSeqnum + ", do nothing");
                 reason = reason + "seqno_decreased";
             } else {
                 if (!cmd.getSignature().equals(currSig)) {
-                    s_logger.info("Identical seqno received: " + cmd.getSeqNum() + " new signature received:" + cmd.getSignature() + " curr=" + currSig +
+                    logger.info("Identical seqno received: " + cmd.getSeqNum() + " new signature received:" + cmd.getSignature() + " curr=" + currSig +
                             ", updated iptables");
                     action = ", updated iptables";
                     reason = reason + "seqno_same_sig_changed";
                     updateSeqnoAndSig = true;
                 } else {
-                    s_logger.info("Identical seqno received: " + cmd.getSeqNum() + " curr=" + currSeqnum + " no change in signature:" + cmd.getSignature() +
+                    logger.info("Identical seqno received: " + cmd.getSeqNum() + " curr=" + currSeqnum + " no change in signature:" + cmd.getSignature() +
                             ", do nothing");
                     reason = reason + "seqno_same_sig_same";
                 }
             }
         } else {
-            s_logger.info("New seqno received: " + cmd.getSeqNum() + " old=null");
+            logger.info("New seqno received: " + cmd.getSeqNum() + " old=null");
             updateSeqnoAndSig = true;
             action = ", updated iptables";
             reason = ", seqno_new";
         }
-        s_logger.info("Programmed network rules for vm " + cmd.getVmName() + " seqno=" + cmd.getSeqNum() + " signature=" + cmd.getSignature() + " guestIp=" +
+        logger.info("Programmed network rules for vm " + cmd.getVmName() + " seqno=" + cmd.getSeqNum() + " signature=" + cmd.getSignature() + " guestIp=" +
                 cmd.getGuestIp() + ", numIngressRules=" + cmd.getIngressRuleSet().length + ", numEgressRules=" + cmd.getEgressRuleSet().length + " total cidrs=" +
                 cmd.getTotalNumCidrs() + action + reason);
         return updateSeqnoAndSig;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/SimulatorManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/SimulatorManagerImpl.java b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/SimulatorManagerImpl.java
index f9ed9ed..02bf9b3 100644
--- a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/SimulatorManagerImpl.java
+++ b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/SimulatorManagerImpl.java
@@ -32,7 +32,6 @@ import org.apache.cloudstack.storage.command.DownloadCommand;
 import org.apache.cloudstack.storage.command.DownloadProgressCommand;
 import org.apache.cloudstack.storage.command.StorageSubSystemCommand;
 import org.apache.cloudstack.storage.command.UploadStatusCommand;
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.agent.api.Answer;
@@ -134,7 +133,6 @@ import com.google.gson.stream.JsonReader;
 @Component
 @Local(value = {SimulatorManager.class})
 public class SimulatorManagerImpl extends ManagerBase implements SimulatorManager, PluggableService {
-    private static final Logger s_logger = Logger.getLogger(SimulatorManagerImpl.class);
     private static final Gson s_gson = GsonHelper.getGson();
     @Inject
     MockVmManager _mockVmMgr;
@@ -223,7 +221,7 @@ public class SimulatorManagerImpl extends ManagerBase implements SimulatorManage
                         try {
                             info.setTimeout(Integer.valueOf(entry.getValue()));
                         } catch (final NumberFormatException e) {
-                            s_logger.debug("invalid timeout parameter: " + e.toString());
+                            logger.debug("invalid timeout parameter: " + e.toString());
                         }
                     }
 
@@ -232,9 +230,9 @@ public class SimulatorManagerImpl extends ManagerBase implements SimulatorManage
                             final int wait = Integer.valueOf(entry.getValue());
                             Thread.sleep(wait);
                         } catch (final NumberFormatException e) {
-                            s_logger.debug("invalid wait parameter: " + e.toString());
+                            logger.debug("invalid wait parameter: " + e.toString());
                         } catch (final InterruptedException e) {
-                            s_logger.debug("thread is interrupted: " + e.toString());
+                            logger.debug("thread is interrupted: " + e.toString());
                         }
                     }
 
@@ -422,7 +420,7 @@ public class SimulatorManagerImpl extends ManagerBase implements SimulatorManage
                         cmd instanceof SecStorageFirewallCfgCommand) {
                     answer = new Answer(cmd);
                 } else {
-                    s_logger.error("Simulator does not implement command of type " + cmd.toString());
+                    logger.error("Simulator does not implement command of type " + cmd.toString());
                     answer = Answer.createUnsupportedCommandAnswer(cmd);
                 }
             }
@@ -436,7 +434,7 @@ public class SimulatorManagerImpl extends ManagerBase implements SimulatorManage
 
             return answer;
         } catch (final Exception e) {
-            s_logger.error("Failed execute cmd: ", e);
+            logger.error("Failed execute cmd: ", e);
             txn.rollback();
             return new Answer(cmd, false, e.toString());
         } finally {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/hypervisors/simulator/src/com/cloud/ha/SimulatorFencer.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/ha/SimulatorFencer.java b/plugins/hypervisors/simulator/src/com/cloud/ha/SimulatorFencer.java
index aa7c3d4..5910a50 100644
--- a/plugins/hypervisors/simulator/src/com/cloud/ha/SimulatorFencer.java
+++ b/plugins/hypervisors/simulator/src/com/cloud/ha/SimulatorFencer.java
@@ -23,7 +23,6 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
-import org.apache.log4j.Logger;
 
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.FenceAnswer;
@@ -41,7 +40,6 @@ import com.cloud.vm.VirtualMachine;
 
 @Local(value=FenceBuilder.class)
 public class SimulatorFencer extends AdapterBase implements FenceBuilder {
-    private static final Logger s_logger = Logger.getLogger(SimulatorFencer.class);
 
     @Inject HostDao _hostDao;
     @Inject AgentManager _agentMgr;
@@ -72,7 +70,7 @@ public class SimulatorFencer extends AdapterBase implements FenceBuilder {
     @Override
     public Boolean fenceOff(VirtualMachine vm, Host host) {
         if (host.getHypervisorType() != HypervisorType.Simulator) {
-            s_logger.debug("Don't know how to fence non simulator hosts " + host.getHypervisorType());
+            logger.debug("Don't know how to fence non simulator hosts " + host.getHypervisorType());
             return null;
         }
 
@@ -91,13 +89,13 @@ public class SimulatorFencer extends AdapterBase implements FenceBuilder {
                 try {
                     answer = (FenceAnswer)_agentMgr.send(h.getId(), fence);
                 } catch (AgentUnavailableException e) {
-                    if (s_logger.isDebugEnabled()) {
-                        s_logger.debug("Moving on to the next host because " + h.toString() + " is unavailable");
+                    if (logger.isDebugEnabled()) {
+                        logger.debug("Moving on to the next host because " + h.toString() + " is unavailable");
                     }
                     continue;
                 } catch (OperationTimedoutException e) {
-                    if (s_logger.isDebugEnabled()) {
-                        s_logger.debug("Moving on to the next host because " + h.toString() + " is unavailable");
+                    if (logger.isDebugEnabled()) {
+                        logger.debug("Moving on to the next host because " + h.toString() + " is unavailable");
                     }
                     continue;
                 }
@@ -107,8 +105,8 @@ public class SimulatorFencer extends AdapterBase implements FenceBuilder {
             }
         }
 
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Unable to fence off " + vm.toString() + " on " + host.toString());
+        if (logger.isDebugEnabled()) {
+            logger.debug("Unable to fence off " + vm.toString() + " on " + host.toString());
         }
 
         return false;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/hypervisors/simulator/src/com/cloud/ha/SimulatorInvestigator.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/ha/SimulatorInvestigator.java b/plugins/hypervisors/simulator/src/com/cloud/ha/SimulatorInvestigator.java
index bc55ba3..c57337f 100644
--- a/plugins/hypervisors/simulator/src/com/cloud/ha/SimulatorInvestigator.java
+++ b/plugins/hypervisors/simulator/src/com/cloud/ha/SimulatorInvestigator.java
@@ -21,7 +21,6 @@ import java.util.List;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
 
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.Answer;
@@ -43,7 +42,6 @@ import com.cloud.vm.VirtualMachine.PowerState;
 
 @Local(value=Investigator.class)
 public class SimulatorInvestigator extends AdapterBase implements Investigator {
-    private final static Logger s_logger = Logger.getLogger(SimulatorInvestigator.class);
     @Inject
     AgentManager _agentMgr;
     @Inject
@@ -72,7 +70,7 @@ public class SimulatorInvestigator extends AdapterBase implements Investigator {
                     return answer.getResult() ? Status.Up : Status.Down;
                 }
             } catch (Exception e) {
-                s_logger.debug("Failed to send command to host: " + neighbor.getId());
+                logger.debug("Failed to send command to host: " + neighbor.getId());
             }
         }
 
@@ -85,17 +83,17 @@ public class SimulatorInvestigator extends AdapterBase implements Investigator {
         try {
             Answer answer = _agentMgr.send(vm.getHostId(), cmd);
             if (!answer.getResult()) {
-                s_logger.debug("Unable to get vm state on " + vm.toString());
+                logger.debug("Unable to get vm state on " + vm.toString());
                 throw new UnknownVM();
             }
             CheckVirtualMachineAnswer cvmAnswer = (CheckVirtualMachineAnswer)answer;
-            s_logger.debug("Agent responded with state " + cvmAnswer.getState().toString());
+            logger.debug("Agent responded with state " + cvmAnswer.getState().toString());
             return cvmAnswer.getState() == PowerState.PowerOn;
         } catch (AgentUnavailableException e) {
-            s_logger.debug("Unable to reach the agent for " + vm.toString() + ": " + e.getMessage());
+            logger.debug("Unable to reach the agent for " + vm.toString() + ": " + e.getMessage());
             throw new UnknownVM();
         } catch (OperationTimedoutException e) {
-            s_logger.debug("Operation timed out for " + vm.toString() + ": " + e.getMessage());
+            logger.debug("Operation timed out for " + vm.toString() + ": " + e.getMessage());
             throw new UnknownVM();
         }
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorDiscoverer.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorDiscoverer.java b/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorDiscoverer.java
index 7c31a9a..84f678d 100644
--- a/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorDiscoverer.java
+++ b/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorDiscoverer.java
@@ -28,7 +28,6 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
-import org.apache.log4j.Logger;
 
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.Listener;
@@ -55,7 +54,6 @@ import com.cloud.storage.dao.VMTemplateZoneDao;
 
 @Local(value = Discoverer.class)
 public class SimulatorDiscoverer extends DiscovererBase implements Discoverer, Listener, ResourceStateAdapter {
-    private static final Logger s_logger = Logger.getLogger(SimulatorDiscoverer.class);
 
     @Inject
     HostDao _hostDao;
@@ -94,8 +92,8 @@ public class SimulatorDiscoverer extends DiscovererBase implements Discoverer, L
             if (scheme.equals("http")) {
                 if (host == null || !host.startsWith("sim")) {
                     String msg = "uri is not of simulator type so we're not taking care of the discovery for this: " + uri;
-                    if (s_logger.isDebugEnabled()) {
-                        s_logger.debug(msg);
+                    if (logger.isDebugEnabled()) {
+                        logger.debug(msg);
                     }
                     return null;
                 }
@@ -121,8 +119,8 @@ public class SimulatorDiscoverer extends DiscovererBase implements Discoverer, L
                 }
             } else {
                 String msg = "uriString is not http so we're not taking care of the discovery for this: " + uri;
-                if (s_logger.isDebugEnabled()) {
-                    s_logger.debug(msg);
+                if (logger.isDebugEnabled()) {
+                    logger.debug(msg);
                 }
                 return null;
             }
@@ -130,15 +128,15 @@ public class SimulatorDiscoverer extends DiscovererBase implements Discoverer, L
             String cluster = null;
             if (clusterId == null) {
                 String msg = "must specify cluster Id when adding host";
-                if (s_logger.isDebugEnabled()) {
-                    s_logger.debug(msg);
+                if (logger.isDebugEnabled()) {
+                    logger.debug(msg);
                 }
                 throw new RuntimeException(msg);
             } else {
                 ClusterVO clu = _clusterDao.findById(clusterId);
                 if (clu == null || (clu.getHypervisorType() != HypervisorType.Simulator)) {
-                    if (s_logger.isInfoEnabled())
-                        s_logger.info("invalid cluster id or cluster is not for Simulator hypervisors");
+                    if (logger.isInfoEnabled())
+                        logger.info("invalid cluster id or cluster is not for Simulator hypervisors");
                     return null;
                 }
                 cluster = Long.toString(clusterId);
@@ -151,8 +149,8 @@ public class SimulatorDiscoverer extends DiscovererBase implements Discoverer, L
             String pod;
             if (podId == null) {
                 String msg = "must specify pod Id when adding host";
-                if (s_logger.isDebugEnabled()) {
-                    s_logger.debug(msg);
+                if (logger.isDebugEnabled()) {
+                    logger.debug(msg);
                 }
                 throw new RuntimeException(msg);
             } else {
@@ -176,17 +174,17 @@ public class SimulatorDiscoverer extends DiscovererBase implements Discoverer, L
             resources = createAgentResources(params);
             return resources;
         } catch (Exception ex) {
-            s_logger.error("Exception when discovering simulator hosts: " + ex.getMessage());
+            logger.error("Exception when discovering simulator hosts: " + ex.getMessage());
         }
         return null;
     }
 
     private Map<AgentResourceBase, Map<String, String>> createAgentResources(Map<String, Object> params) {
         try {
-            s_logger.info("Creating Simulator Resources");
+            logger.info("Creating Simulator Resources");
             return _mockAgentMgr.createServerResources(params);
         } catch (Exception ex) {
-            s_logger.warn("Caught exception at agent resource creation: " + ex.getMessage(), ex);
+            logger.warn("Caught exception at agent resource creation: " + ex.getMessage(), ex);
         }
         return null;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorSecondaryDiscoverer.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorSecondaryDiscoverer.java b/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorSecondaryDiscoverer.java
index 11bf346..50cd147 100644
--- a/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorSecondaryDiscoverer.java
+++ b/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorSecondaryDiscoverer.java
@@ -29,7 +29,6 @@ import org.apache.cloudstack.storage.datastore.db.ImageStoreDao;
 import org.apache.cloudstack.storage.datastore.db.ImageStoreVO;
 import org.apache.cloudstack.storage.resource.SecondaryStorageDiscoverer;
 import org.apache.cloudstack.storage.resource.SecondaryStorageResource;
-import org.apache.log4j.Logger;
 
 import com.cloud.agent.Listener;
 import com.cloud.agent.api.AgentControlAnswer;
@@ -47,7 +46,6 @@ import com.cloud.storage.dao.SnapshotDao;
 
 @Local(value = Discoverer.class)
 public class SimulatorSecondaryDiscoverer extends SecondaryStorageDiscoverer implements ResourceStateAdapter, Listener {
-    private static final Logger s_logger = Logger.getLogger(SimulatorSecondaryDiscoverer.class);
     @Inject
     MockStorageManager _mockStorageMgr = null;
     @Inject
@@ -71,7 +69,7 @@ public class SimulatorSecondaryDiscoverer extends SecondaryStorageDiscoverer imp
     public Map<? extends ServerResource, Map<String, String>>
         find(long dcId, Long podId, Long clusterId, URI uri, String username, String password, List<String> hostTags) {
         if (!uri.getScheme().equalsIgnoreCase("sim")) {
-            s_logger.debug("It's not NFS or file or ISO, so not a secondary storage server: " + uri.toString());
+            logger.debug("It's not NFS or file or ISO, so not a secondary storage server: " + uri.toString());
             return null;
         }
         List<ImageStoreVO> stores = imageStoreDao.listImageStores();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/hypervisors/simulator/src/com/cloud/simulator/dao/MockConfigurationDaoImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/simulator/dao/MockConfigurationDaoImpl.java b/plugins/hypervisors/simulator/src/com/cloud/simulator/dao/MockConfigurationDaoImpl.java
index 1196260..3231ee9 100644
--- a/plugins/hypervisors/simulator/src/com/cloud/simulator/dao/MockConfigurationDaoImpl.java
+++ b/plugins/hypervisors/simulator/src/com/cloud/simulator/dao/MockConfigurationDaoImpl.java
@@ -22,7 +22,6 @@ import java.util.Formatter;
 
 import javax.ejb.Local;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.simulator.MockConfigurationVO;
@@ -34,7 +33,6 @@ import com.cloud.utils.db.TransactionLegacy;
 @Component
 @Local(value = {MockConfigurationDao.class})
 public class MockConfigurationDaoImpl extends GenericDaoBase<MockConfigurationVO, Long> implements MockConfigurationDao {
-    final static Logger s_logger = Logger.getLogger(MockConfigurationDaoImpl.class);
     private final SearchBuilder<MockConfigurationVO> _searchByDcIdName;
     private final SearchBuilder<MockConfigurationVO> _searchByDcIDPodIdName;
     private final SearchBuilder<MockConfigurationVO> _searchByDcIDPodIdClusterIdName;
@@ -141,7 +139,7 @@ public class MockConfigurationDaoImpl extends GenericDaoBase<MockConfigurationVO
                 return toEntityBean(rs, false);
             }
         } catch (Exception e) {
-            s_logger.info("[ignored]"
+            logger.info("[ignored]"
                     + "error while executing dynamically build search: " + e.getLocalizedMessage());
         }
         return null;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
index 62d82c2..0e13180 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
@@ -39,7 +39,6 @@ import org.apache.cloudstack.storage.command.StorageSubSystemCommand;
 import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
 import org.apache.cloudstack.storage.to.VolumeObjectTO;
-import org.apache.log4j.Logger;
 
 import com.cloud.agent.api.BackupSnapshotCommand;
 import com.cloud.agent.api.Command;
@@ -107,7 +106,6 @@ import com.cloud.vm.dao.VMInstanceDao;
 
 @Local(value = HypervisorGuru.class)
 public class VMwareGuru extends HypervisorGuruBase implements HypervisorGuru, Configurable {
-    private static final Logger s_logger = Logger.getLogger(VMwareGuru.class);
 
     @Inject
     private NetworkDao _networkDao;
@@ -183,7 +181,7 @@ public class VMwareGuru extends HypervisorGuruBase implements HypervisorGuru, Co
                 try {
                     VirtualEthernetCardType.valueOf(nicDeviceType);
                 } catch (Exception e) {
-                    s_logger.warn("Invalid NIC device type " + nicDeviceType + " is specified in VM details, switch to default E1000");
+                    logger.warn("Invalid NIC device type " + nicDeviceType + " is specified in VM details, switch to default E1000");
                     details.put(VmDetailConstants.NIC_ADAPTER, VirtualEthernetCardType.E1000.toString());
                 }
             }
@@ -195,7 +193,7 @@ public class VMwareGuru extends HypervisorGuruBase implements HypervisorGuru, Co
                 try {
                     VirtualEthernetCardType.valueOf(nicDeviceType);
                 } catch (Exception e) {
-                    s_logger.warn("Invalid NIC device type " + nicDeviceType + " is specified in VM details, switch to default E1000");
+                    logger.warn("Invalid NIC device type " + nicDeviceType + " is specified in VM details, switch to default E1000");
                     details.put(VmDetailConstants.NIC_ADAPTER, VirtualEthernetCardType.E1000.toString());
                 }
             }
@@ -303,7 +301,7 @@ public class VMwareGuru extends HypervisorGuruBase implements HypervisorGuru, Co
         if (userVm) {
             String nestedVirt = _configDao.getValue(Config.VmwareEnableNestedVirtualization.key());
             if (nestedVirt != null) {
-                s_logger.debug("Nested virtualization requested, adding flag to vm configuration");
+                logger.debug("Nested virtualization requested, adding flag to vm configuration");
                 details.put(VmDetailConstants.NESTED_VIRTUALIZATION_FLAG, nestedVirt);
                 to.setDetails(details);
 
@@ -483,7 +481,7 @@ public class VMwareGuru extends HypervisorGuruBase implements HypervisorGuru, Co
 
         String vCenterIp = NetUtils.resolveToIp(tokens[1]);
         if (vCenterIp == null) {
-            s_logger.error("Fatal : unable to resolve vCenter address " + tokens[1] + ", please check your DNS configuration");
+            logger.error("Fatal : unable to resolve vCenter address " + tokens[1] + ", please check your DNS configuration");
             return guid;
         }
 
@@ -500,7 +498,7 @@ public class VMwareGuru extends HypervisorGuruBase implements HypervisorGuru, Co
         for (NicVO nic : nicVOs) {
             NetworkVO network = _networkDao.findById(nic.getNetworkId());
             if (network.getBroadcastDomainType() == BroadcastDomainType.Lswitch) {
-                s_logger.debug("Nic " + nic.toString() + " is connected to an lswitch, cleanup required");
+                logger.debug("Nic " + nic.toString() + " is connected to an lswitch, cleanup required");
                 NetworkVO networkVO = _networkDao.findById(nic.getNetworkId());
                 // We need the traffic label to figure out which vSwitch has the
                 // portgroup

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareServerDiscoverer.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareServerDiscoverer.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareServerDiscoverer.java
index 20eb659..9a5e759 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareServerDiscoverer.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareServerDiscoverer.java
@@ -28,7 +28,6 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
-import org.apache.log4j.Logger;
 
 import com.vmware.vim25.ClusterDasConfigInfo;
 import com.vmware.vim25.ManagedObjectReference;
@@ -82,7 +81,6 @@ import com.cloud.utils.UriUtils;
 
 @Local(value = Discoverer.class)
 public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer, ResourceStateAdapter {
-    private static final Logger s_logger = Logger.getLogger(VmwareServerDiscoverer.class);
 
     @Inject
     VmwareManager _vmwareMgr;
@@ -110,27 +108,27 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
     List<NetworkElement> networkElements;
 
     public VmwareServerDiscoverer() {
-        s_logger.info("VmwareServerDiscoverer is constructed");
+        logger.info("VmwareServerDiscoverer is constructed");
     }
 
     @Override
     public Map<? extends ServerResource, Map<String, String>>
     find(long dcId, Long podId, Long clusterId, URI url, String username, String password, List<String> hostTags) throws DiscoveryException {
 
-        if (s_logger.isInfoEnabled())
-            s_logger.info("Discover host. dc: " + dcId + ", pod: " + podId + ", cluster: " + clusterId + ", uri host: " + url.getHost());
+        if (logger.isInfoEnabled())
+            logger.info("Discover host. dc: " + dcId + ", pod: " + podId + ", cluster: " + clusterId + ", uri host: " + url.getHost());
 
         if (podId == null) {
-            if (s_logger.isInfoEnabled())
-                s_logger.info("No pod is assigned, assuming that it is not for vmware and skip it to next discoverer");
+            if (logger.isInfoEnabled())
+                logger.info("No pod is assigned, assuming that it is not for vmware and skip it to next discoverer");
             return null;
         }
         boolean failureInClusterDiscovery = true;
         String vsmIp = "";
         ClusterVO cluster = _clusterDao.findById(clusterId);
         if (cluster == null || cluster.getHypervisorType() != HypervisorType.VMware) {
-            if (s_logger.isInfoEnabled())
-                s_logger.info("invalid cluster id or cluster is not for VMware hypervisors");
+            if (logger.isInfoEnabled())
+                logger.info("invalid cluster id or cluster is not for VMware hypervisors");
             return null;
         }
 
@@ -146,7 +144,7 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
             // If either or both not provided, try to retrieve & use the credentials from database, which are provided earlier while adding VMware DC to zone.
             if (usernameNotProvided || passwordNotProvided) {
                 // Retrieve credentials associated with VMware DC
-                s_logger.info("Username and/or Password not provided while adding cluster to cloudstack zone. "
+                logger.info("Username and/or Password not provided while adding cluster to cloudstack zone. "
                         + "Hence using both username & password provided while adding VMware DC to CloudStack zone.");
                 username = vmwareDc.getUser();
                 password = vmwareDc.getPassword();
@@ -182,7 +180,7 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
             int maxHostsPerCluster = _hvCapabilitiesDao.getMaxHostsPerCluster(hosts.get(0).getHypervisorType(), hosts.get(0).getHypervisorVersion());
             if (hosts.size() >= maxHostsPerCluster) {
                 String msg = "VMware cluster " + cluster.getName() + " is too big to add new host, current size: " + hosts.size() + ", max. size: " + maxHostsPerCluster;
-                s_logger.error(msg);
+                logger.error(msg);
                 throw new DiscoveredWithErrorException(msg);
             }
         }
@@ -268,7 +266,7 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
                             "Both public traffic and guest traffic is over same physical network " + pNetworkPublic +
                             ". And virtual switch type chosen for each traffic is different" +
                             ". A physical network cannot be shared by different types of virtual switches.";
-                    s_logger.error(msg);
+                    logger.error(msg);
                     throw new InvalidParameterValueException(msg);
                 }
             }
@@ -276,7 +274,7 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
 
         privateTrafficLabel = _netmgr.getDefaultManagementTrafficLabel(dcId, HypervisorType.VMware);
         if (privateTrafficLabel != null) {
-            s_logger.info("Detected private network label : " + privateTrafficLabel);
+            logger.info("Detected private network label : " + privateTrafficLabel);
         }
         Pair<Boolean, Long> vsmInfo = new Pair<Boolean, Long>(false, 0L);
         if (nexusDVS && (guestTrafficLabelObj.getVirtualSwitchType() == VirtualSwitchType.NexusDistributedVirtualSwitch) ||
@@ -287,13 +285,13 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
             if (zoneType != NetworkType.Basic) {
                 publicTrafficLabel = _netmgr.getDefaultPublicTrafficLabel(dcId, HypervisorType.VMware);
                 if (publicTrafficLabel != null) {
-                    s_logger.info("Detected public network label : " + publicTrafficLabel);
+                    logger.info("Detected public network label : " + publicTrafficLabel);
                 }
             }
             // Get physical network label
             guestTrafficLabel = _netmgr.getDefaultGuestTrafficLabel(dcId, HypervisorType.VMware);
             if (guestTrafficLabel != null) {
-                s_logger.info("Detected guest network label : " + guestTrafficLabel);
+                logger.info("Detected guest network label : " + guestTrafficLabel);
             }
             // Before proceeding with validation of Nexus 1000v VSM check if an instance of Nexus 1000v VSM is already associated with this cluster.
             boolean clusterHasVsm = _vmwareMgr.hasNexusVSM(clusterId);
@@ -320,18 +318,18 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
 
             if (nexusDVS) {
                 if (vsmCredentials != null) {
-                    s_logger.info("Stocking credentials of Nexus VSM");
+                    logger.info("Stocking credentials of Nexus VSM");
                     context.registerStockObject("vsmcredentials", vsmCredentials);
                 }
             }
             List<ManagedObjectReference> morHosts = _vmwareMgr.addHostToPodCluster(context, dcId, podId, clusterId, URLDecoder.decode(url.getPath(), "UTF-8"));
             if (morHosts == null)
-                s_logger.info("Found 0 hosts.");
+                logger.info("Found 0 hosts.");
             if (privateTrafficLabel != null)
                 context.uregisterStockObject("privateTrafficLabel");
 
             if (morHosts == null) {
-                s_logger.error("Unable to find host or cluster based on url: " + URLDecoder.decode(url.getPath(), "UTF-8"));
+                logger.error("Unable to find host or cluster based on url: " + URLDecoder.decode(url.getPath(), "UTF-8"));
                 return null;
             }
 
@@ -342,7 +340,7 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
                 morCluster = context.getHostMorByPath(URLDecoder.decode(uriFromCluster.getPath(), "UTF-8"));
 
                 if (morCluster == null || !morCluster.getType().equalsIgnoreCase("ClusterComputeResource")) {
-                    s_logger.warn("Cluster url does not point to a valid vSphere cluster, url: " + clusterDetails.get("url"));
+                    logger.warn("Cluster url does not point to a valid vSphere cluster, url: " + clusterDetails.get("url"));
                     return null;
                 } else {
                     ClusterMO clusterMo = new ClusterMO(context, morCluster);
@@ -356,9 +354,9 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
 
             if (!validateDiscoveredHosts(context, morCluster, morHosts)) {
                 if (morCluster == null)
-                    s_logger.warn("The discovered host is not standalone host, can not be added to a standalone cluster");
+                    logger.warn("The discovered host is not standalone host, can not be added to a standalone cluster");
                 else
-                    s_logger.warn("The discovered host does not belong to the cluster");
+                    logger.warn("The discovered host does not belong to the cluster");
                 return null;
             }
 
@@ -394,7 +392,7 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
                     resource.configure("VMware", params);
                 } catch (ConfigurationException e) {
                     _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_HOST, dcId, podId, "Unable to add " + url.getHost(), "Error is " + e.getMessage());
-                    s_logger.warn("Unable to instantiate " + url.getHost(), e);
+                    logger.warn("Unable to instantiate " + url.getHost(), e);
                 }
                 resource.start();
 
@@ -414,17 +412,17 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
         } catch (DiscoveredWithErrorException e) {
             throw e;
         } catch (Exception e) {
-            s_logger.warn("Unable to connect to Vmware vSphere server. service address: " + url.getHost() + ". " + e);
+            logger.warn("Unable to connect to Vmware vSphere server. service address: " + url.getHost() + ". " + e);
             return null;
         } finally {
             if (context != null)
                 context.close();
             if (failureInClusterDiscovery && vsmInfo.first()) {
                 try {
-                    s_logger.debug("Deleting Nexus 1000v VSM " + vsmIp + " because cluster discovery and addition to zone has failed.");
+                    logger.debug("Deleting Nexus 1000v VSM " + vsmIp + " because cluster discovery and addition to zone has failed.");
                     _nexusElement.deleteCiscoNexusVSM(vsmInfo.second().longValue());
                 } catch (Exception e) {
-                    s_logger.warn("Deleting Nexus 1000v VSM " + vsmIp + " failed.");
+                    logger.warn("Deleting Nexus 1000v VSM " + vsmIp + " failed.");
                 }
             }
         }
@@ -449,7 +447,7 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
         vmwareDcZone = _vmwareDcZoneMapDao.findByZoneId(dcId);
         if (vmwareDcZone == null) {
             msg = "Zone " + dcId + " is not associated with any VMware DC yet. " + "Please add VMware DC to this zone first and then try to add clusters.";
-            s_logger.error(msg);
+            logger.error(msg);
             throw new DiscoveryException(msg);
         }
 
@@ -494,13 +492,13 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
             msg =
                     "This cluster " + clusterName + " belongs to vCenter " + url.getHost() + ". But this zone is associated with VMware DC from vCenter " + vCenterHost +
                     ". Make sure the cluster being added belongs to vCenter " + vCenterHost + " and VMware DC " + vmwareDcNameFromDb;
-            s_logger.error(msg);
+            logger.error(msg);
             throw new DiscoveryException(msg);
         } else if (!vmwareDcNameFromDb.equalsIgnoreCase(vmwareDcNameFromApi)) {
             msg =
                     "This cluster " + clusterName + " belongs to VMware DC " + vmwareDcNameFromApi + " .But this zone is associated with VMware DC " + vmwareDcNameFromDb +
                     ". Make sure the cluster being added belongs to VMware DC " + vmwareDcNameFromDb + " in vCenter " + vCenterHost;
-            s_logger.error(msg);
+            logger.error(msg);
             throw new DiscoveryException(msg);
         }
         return updatedInventoryPath;
@@ -547,15 +545,15 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
 
     @Override
     public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
-        if (s_logger.isInfoEnabled())
-            s_logger.info("Configure VmwareServerDiscoverer, discover name: " + name);
+        if (logger.isInfoEnabled())
+            logger.info("Configure VmwareServerDiscoverer, discover name: " + name);
 
         super.configure(name, params);
 
         createVmwareToolsIso();
 
-        if (s_logger.isInfoEnabled()) {
-            s_logger.info("VmwareServerDiscoverer has been successfully configured");
+        if (logger.isInfoEnabled()) {
+            logger.info("VmwareServerDiscoverer has been successfully configured");
         }
         _resourceMgr.registerResourceStateAdapter(this.getClass().getSimpleName(), this);
         return true;
@@ -634,7 +632,7 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
         try {
             trafficLabelObj = new VmwareTrafficLabel(zoneWideTrafficLabel, trafficType, defaultVirtualSwitchType);
         } catch (InvalidParameterValueException e) {
-            s_logger.error("Failed to recognize virtual switch type specified for " + trafficType + " traffic due to " + e.getMessage());
+            logger.error("Failed to recognize virtual switch type specified for " + trafficType + " traffic due to " + e.getMessage());
             throw e;
         }
 
@@ -670,7 +668,7 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
         try {
             trafficLabelObj = new VmwareTrafficLabel(zoneWideTrafficLabel, trafficType, defVirtualSwitchType);
         } catch (InvalidParameterValueException e) {
-            s_logger.error("Failed to recognize virtual switch type specified for " + trafficType + " traffic due to " + e.getMessage());
+            logger.error("Failed to recognize virtual switch type specified for " + trafficType + " traffic due to " + e.getMessage());
             throw e;
         }
 
@@ -745,11 +743,11 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
             try {
                 resource.configure(host.getName(), params);
             } catch (ConfigurationException e) {
-                s_logger.warn("Unable to configure resource due to " + e.getMessage());
+                logger.warn("Unable to configure resource due to " + e.getMessage());
                 return null;
             }
             if (!resource.start()) {
-                s_logger.warn("Unable to start the resource");
+                logger.warn("Unable to start the resource");
                 return null;
             }
         }
@@ -759,7 +757,7 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
     private void validateVswitchType(String inputVswitchType) {
         VirtualSwitchType vSwitchType = VirtualSwitchType.getType(inputVswitchType);
         if (vSwitchType == VirtualSwitchType.None) {
-            s_logger.error("Unable to resolve " + inputVswitchType + " to a valid virtual switch type in VMware environment.");
+            logger.error("Unable to resolve " + inputVswitchType + " to a valid virtual switch type in VMware environment.");
             throw new InvalidParameterValueException("Invalid virtual switch type : " + inputVswitchType);
         }
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/LegacyZoneDaoImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/LegacyZoneDaoImpl.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/LegacyZoneDaoImpl.java
index 46e8105..61f38b6 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/LegacyZoneDaoImpl.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/LegacyZoneDaoImpl.java
@@ -21,7 +21,6 @@ import java.util.List;
 
 import javax.ejb.Local;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.hypervisor.vmware.LegacyZoneVO;
@@ -35,7 +34,6 @@ import com.cloud.utils.db.SearchCriteria.Op;
 @Local(value = LegacyZoneDao.class)
 @DB
 public class LegacyZoneDaoImpl extends GenericDaoBase<LegacyZoneVO, Long> implements LegacyZoneDao {
-    protected static final Logger s_logger = Logger.getLogger(LegacyZoneDaoImpl.class);
 
     final SearchBuilder<LegacyZoneVO> zoneSearch;
     final SearchBuilder<LegacyZoneVO> fullTableSearch;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/VmwareDatacenterDaoImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/VmwareDatacenterDaoImpl.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/VmwareDatacenterDaoImpl.java
index bd12f92..1fdbcf6 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/VmwareDatacenterDaoImpl.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/VmwareDatacenterDaoImpl.java
@@ -21,7 +21,6 @@ import java.util.List;
 
 import javax.ejb.Local;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.hypervisor.vmware.VmwareDatacenterVO;
@@ -35,7 +34,6 @@ import com.cloud.utils.db.SearchCriteria.Op;
 @Local(value = VmwareDatacenterDao.class)
 @DB
 public class VmwareDatacenterDaoImpl extends GenericDaoBase<VmwareDatacenterVO, Long> implements VmwareDatacenterDao {
-    protected static final Logger s_logger = Logger.getLogger(VmwareDatacenterDaoImpl.class);
 
     final SearchBuilder<VmwareDatacenterVO> nameSearch;
     final SearchBuilder<VmwareDatacenterVO> guidSearch;


Mime
View raw message