cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [22/36] git commit: updated refs/heads/master to cd7218e
Date Sat, 29 Aug 2015 20:06:19 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailElementImpl.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailElementImpl.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailElementImpl.java
index 7f56409..85755e5 100644
--- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailElementImpl.java
+++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailElementImpl.java
@@ -32,7 +32,6 @@ import org.apache.cloudstack.network.contrail.model.InstanceIpModel;
 import org.apache.cloudstack.network.contrail.model.VMInterfaceModel;
 import org.apache.cloudstack.network.contrail.model.VirtualMachineModel;
 import org.apache.cloudstack.network.contrail.model.VirtualNetworkModel;
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.deploy.DeployDestination;
@@ -85,7 +84,6 @@ public class ContrailElementImpl extends AdapterBase
     NicDao _nicDao;
     @Inject
     ServerDBSync _dbSync;
-    private static final Logger s_logger = Logger.getLogger(ContrailElement.class);
 
     // PluggableService
     @Override
@@ -122,9 +120,9 @@ public class ContrailElementImpl extends AdapterBase
     @Override
     public boolean implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
         ResourceUnavailableException, InsufficientCapacityException {
-        s_logger.debug("NetworkElement implement: " + network.getName() + ", traffic type: " + network.getTrafficType());
+        logger.debug("NetworkElement implement: " + network.getName() + ", traffic type: " + network.getTrafficType());
         if (network.getTrafficType() == TrafficType.Guest) {
-            s_logger.debug("ignore network " + network.getName());
+            logger.debug("ignore network " + network.getName());
             return true;
         }
         VirtualNetworkModel vnModel = _manager.getDatabase().lookupVirtualNetwork(network.getUuid(), _manager.getCanonicalName(network), network.getTrafficType());
@@ -139,7 +137,7 @@ public class ContrailElementImpl extends AdapterBase
             }
             _manager.getDatabase().getVirtualNetworks().add(vnModel);
         } catch (Exception ex) {
-            s_logger.warn("virtual-network update: ", ex);
+            logger.warn("virtual-network update: ", ex);
         }
         return true;
     }
@@ -148,14 +146,14 @@ public class ContrailElementImpl extends AdapterBase
     public boolean prepare(Network network, NicProfile nicProfile, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
         throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
 
-        s_logger.debug("NetworkElement prepare: " + network.getName() + ", traffic type: " + network.getTrafficType());
+        logger.debug("NetworkElement prepare: " + network.getName() + ", traffic type: " + network.getTrafficType());
 
         if (network.getTrafficType() == TrafficType.Guest) {
-            s_logger.debug("ignore network " + network.getName());
+            logger.debug("ignore network " + network.getName());
             return true;
         }
 
-        s_logger.debug("network: " + network.getId());
+        logger.debug("network: " + network.getId());
 
         VirtualNetworkModel vnModel = _manager.getDatabase().lookupVirtualNetwork(network.getUuid(), _manager.getCanonicalName(network), network.getTrafficType());
 
@@ -185,7 +183,7 @@ public class ContrailElementImpl extends AdapterBase
         try {
             vmiModel.build(_manager.getModelController(), (VMInstanceVO)vm.getVirtualMachine(), nic);
         } catch (IOException ex) {
-            s_logger.warn("vm interface set", ex);
+            logger.warn("vm interface set", ex);
             return false;
         }
 
@@ -199,7 +197,7 @@ public class ContrailElementImpl extends AdapterBase
         try {
             vmModel.update(_manager.getModelController());
         } catch (Exception ex) {
-            s_logger.warn("virtual-machine-update", ex);
+            logger.warn("virtual-machine-update", ex);
             return false;
         }
         _manager.getDatabase().getVirtualMachines().add(vmModel);
@@ -213,7 +211,7 @@ public class ContrailElementImpl extends AdapterBase
         if (network.getTrafficType() == TrafficType.Guest) {
             return true;
         } else if (!_manager.isManagedPhysicalNetwork(network)) {
-            s_logger.debug("release ignore network " + network.getId());
+            logger.debug("release ignore network " + network.getId());
             return true;
         }
 
@@ -222,7 +220,7 @@ public class ContrailElementImpl extends AdapterBase
 
         VirtualMachineModel vmModel = _manager.getDatabase().lookupVirtualMachine(vm.getUuid());
         if (vmModel == null) {
-            s_logger.debug("vm " + vm.getInstanceName() + " not in local database");
+            logger.debug("vm " + vm.getInstanceName() + " not in local database");
             return true;
         }
         VMInterfaceModel vmiModel = vmModel.getVMInterface(nic.getUuid());
@@ -230,7 +228,7 @@ public class ContrailElementImpl extends AdapterBase
             try {
                 vmiModel.destroy(_manager.getModelController());
             } catch (IOException ex) {
-                s_logger.warn("virtual-machine-interface delete", ex);
+                logger.warn("virtual-machine-interface delete", ex);
             }
             vmModel.removeSuccessor(vmiModel);
         }
@@ -252,7 +250,7 @@ public class ContrailElementImpl extends AdapterBase
      */
     @Override
     public boolean shutdown(Network network, ReservationContext context, boolean cleanup) throws ConcurrentOperationException, ResourceUnavailableException {
-        s_logger.debug("NetworkElement shutdown");
+        logger.debug("NetworkElement shutdown");
         return true;
     }
 
@@ -261,7 +259,7 @@ public class ContrailElementImpl extends AdapterBase
      */
     @Override
     public boolean destroy(Network network, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException {
-        s_logger.debug("NetworkElement destroy");
+        logger.debug("NetworkElement destroy");
         return true;
     }
 
@@ -275,11 +273,11 @@ public class ContrailElementImpl extends AdapterBase
                 List<NetworkVO> systemNets = _manager.findSystemNetworks(types);
                 if (systemNets != null && !systemNets.isEmpty()) {
                     for (NetworkVO net: systemNets) {
-                        s_logger.debug("update system network service: " + net.getName() + "; service provider: " + serviceMap);
+                        logger.debug("update system network service: " + net.getName() + "; service provider: " + serviceMap);
                         _networksDao.update(net.getId(), net, serviceMap);
                     }
                 } else {
-                    s_logger.debug("no system networks created yet");
+                    logger.debug("no system networks created yet");
                 }
                 serviceMap = ((ConfigurationServerImpl)_configServer).getServicesAndProvidersForNetwork( _manager.getPublicRouterOffering().getId());
                 types = new ArrayList<TrafficType>();
@@ -287,11 +285,11 @@ public class ContrailElementImpl extends AdapterBase
                 systemNets = _manager.findSystemNetworks(types);
                 if (systemNets != null && !systemNets.isEmpty()) {
                     for (NetworkVO net: systemNets) {
-                        s_logger.debug("update system network service: " + net.getName() + "; service provider: " + serviceMap);
+                        logger.debug("update system network service: " + net.getName() + "; service provider: " + serviceMap);
                         _networksDao.update(net.getId(), net, serviceMap);
                     }
                 } else {
-                    s_logger.debug("no system networks created yet");
+                    logger.debug("no system networks created yet");
                 }
                 return true;
        }
@@ -299,7 +297,7 @@ public class ContrailElementImpl extends AdapterBase
     @Override
     public boolean shutdownProviderInstances(PhysicalNetworkServiceProvider provider, ReservationContext context) throws ConcurrentOperationException,
         ResourceUnavailableException {
-        s_logger.debug("NetworkElement shutdown ProviderInstances");
+        logger.debug("NetworkElement shutdown ProviderInstances");
         return true;
     }
 
@@ -311,8 +309,8 @@ public class ContrailElementImpl extends AdapterBase
     @Override
     public boolean verifyServicesCombination(Set<Service> services) {
         // TODO Auto-generated method stub
-        s_logger.debug("NetworkElement verifyServices");
-        s_logger.debug("Services: " + services);
+        logger.debug("NetworkElement verifyServices");
+        logger.debug("Services: " + services);
         return true;
     }
 
@@ -330,11 +328,11 @@ public class ContrailElementImpl extends AdapterBase
             }
             if (isFloatingIpCreate(ip)) {
                 if (_manager.createFloatingIp(ip)) {
-                    s_logger.debug("Successfully created floating ip: " + ip.getAddress().addr());
+                    logger.debug("Successfully created floating ip: " + ip.getAddress().addr());
                 }
             } else {
                 if (_manager.deleteFloatingIp(ip)) {
-                    s_logger.debug("Successfully deleted floating ip: " + ip.getAddress().addr());
+                    logger.debug("Successfully deleted floating ip: " + ip.getAddress().addr());
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailGuru.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailGuru.java
index 8a86bc8..70e7eeb 100644
--- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailGuru.java
+++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailGuru.java
@@ -28,7 +28,6 @@ import org.apache.cloudstack.network.contrail.model.InstanceIpModel;
 import org.apache.cloudstack.network.contrail.model.VMInterfaceModel;
 import org.apache.cloudstack.network.contrail.model.VirtualMachineModel;
 import org.apache.cloudstack.network.contrail.model.VirtualNetworkModel;
-import org.apache.log4j.Logger;
 
 import com.cloud.dc.DataCenter;
 import com.cloud.dc.DataCenter.NetworkType;
@@ -91,7 +90,6 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru {
     @Inject
     DataCenterDao _dcDao;
 
-    private static final Logger s_logger = Logger.getLogger(ContrailGuru.class);
     private static final TrafficType[] TrafficTypes = {TrafficType.Guest};
 
     private boolean canHandle(NetworkOffering offering, NetworkType networkType, PhysicalNetwork physicalNetwork) {
@@ -126,7 +124,7 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru {
         PhysicalNetworkVO physnet = _physicalNetworkDao.findById(plan.getPhysicalNetworkId());
         DataCenter dc = _dcDao.findById(plan.getDataCenterId());
         if (!canHandle(offering, dc.getNetworkType(),physnet)) {
-            s_logger.debug("Refusing to design this network");
+            logger.debug("Refusing to design this network");
             return null;
         }
         NetworkVO network =
@@ -136,14 +134,14 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru {
             network.setCidr(userSpecified.getCidr());
             network.setGateway(userSpecified.getGateway());
         }
-        s_logger.debug("Allocated network " + userSpecified.getName() + (network.getCidr() == null ? "" : " subnet: " + network.getCidr()));
+        logger.debug("Allocated network " + userSpecified.getName() + (network.getCidr() == null ? "" : " subnet: " + network.getCidr()));
         return network;
     }
 
     @Override
     public Network implement(Network network, NetworkOffering offering, DeployDestination destination, ReservationContext context)
             throws InsufficientVirtualNetworkCapacityException {
-        s_logger.debug("Implement network: " + network.getName() + ", traffic type: " + network.getTrafficType());
+        logger.debug("Implement network: " + network.getName() + ", traffic type: " + network.getTrafficType());
 
         VirtualNetworkModel vnModel = _manager.getDatabase().lookupVirtualNetwork(network.getUuid(), _manager.getCanonicalName(network), network.getTrafficType());
         if (vnModel == null) {
@@ -156,7 +154,7 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru {
                 vnModel.update(_manager.getModelController());
             }
         } catch (Exception ex) {
-            s_logger.warn("virtual-network update: ", ex);
+            logger.warn("virtual-network update: ", ex);
             return network;
         }
         _manager.getDatabase().getVirtualNetworks().add(vnModel);
@@ -164,7 +162,7 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru {
         if (network.getVpcId() != null) {
             List<IPAddressVO> ips = _ipAddressDao.listByAssociatedVpc(network.getVpcId(), true);
             if (ips.isEmpty()) {
-                s_logger.debug("Creating a source nat ip for network " + network);
+                logger.debug("Creating a source nat ip for network " + network);
                 Account owner = _accountMgr.getAccount(network.getAccountId());
                 try {
                     PublicIp publicIp = _ipAddrMgr.assignSourceNatIpAddressToGuestNetwork(owner, network);
@@ -174,7 +172,7 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru {
                     _ipAddressDao.update(ip.getId(), ip);
                     _ipAddressDao.releaseFromLockTable(ip.getId());
                 } catch (Exception e) {
-                    s_logger.error("Unable to allocate source nat ip: " + e);
+                    logger.error("Unable to allocate source nat ip: " + e);
                 }
             }
         }
@@ -190,7 +188,7 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru {
     @Override
     public NicProfile allocate(Network network, NicProfile profile, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapacityException,
     InsufficientAddressCapacityException, ConcurrentOperationException {
-        s_logger.debug("allocate NicProfile on " + network.getName());
+        logger.debug("allocate NicProfile on " + network.getName());
 
         if (profile != null && profile.getRequestedIPv4() != null) {
             throw new CloudRuntimeException("Does not support custom ip allocation at this time: " + profile);
@@ -204,7 +202,7 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru {
         try {
             broadcastUri = new URI("vlan://untagged");
         } catch (Exception e) {
-            s_logger.warn("unable to instantiate broadcast URI: " + e);
+            logger.warn("unable to instantiate broadcast URI: " + e);
         }
         profile.setBroadcastUri(broadcastUri);
 
@@ -217,8 +215,8 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru {
     @Override
     public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
             throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException {
-        s_logger.debug("reserve NicProfile on network id: " + network.getId() + " " + network.getName());
-        s_logger.debug("deviceId: " + nic.getDeviceId());
+        logger.debug("reserve NicProfile on network id: " + network.getId() + " " + network.getName());
+        logger.debug("deviceId: " + nic.getDeviceId());
 
         NicVO nicVO = _nicDao.findById(nic.getId());
         assert nicVO != null;
@@ -244,7 +242,7 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru {
             vmiModel.build(_manager.getModelController(), (VMInstanceVO)vm.getVirtualMachine(), nicVO);
             vmiModel.setActive();
         } catch (IOException ex) {
-            s_logger.error("virtual-machine-interface set", ex);
+            logger.error("virtual-machine-interface set", ex);
             return;
         }
 
@@ -253,17 +251,17 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru {
             ipModel = new InstanceIpModel(vm.getInstanceName(), nic.getDeviceId());
             ipModel.addToVMInterface(vmiModel);
         } else {
-            s_logger.debug("Reuse existing instance-ip object on " + ipModel.getName());
+            logger.debug("Reuse existing instance-ip object on " + ipModel.getName());
         }
         if (nic.getIPv4Address() != null) {
-            s_logger.debug("Nic using existing IP address " + nic.getIPv4Address());
+            logger.debug("Nic using existing IP address " + nic.getIPv4Address());
             ipModel.setAddress(nic.getIPv4Address());
         }
 
         try {
             vmModel.update(_manager.getModelController());
         } catch (Exception ex) {
-            s_logger.warn("virtual-machine update", ex);
+            logger.warn("virtual-machine update", ex);
             return;
         }
 
@@ -274,15 +272,15 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru {
         if (nic.getMacAddress() == null) {
             MacAddressesType macs = vmi.getMacAddresses();
             if (macs == null) {
-                s_logger.debug("no mac address is allocated for Nic " + nicVO.getUuid());
+                logger.debug("no mac address is allocated for Nic " + nicVO.getUuid());
             } else {
-                s_logger.info("VMI " + _manager.getVifNameByVmUuid(vm.getUuid(), nicVO.getDeviceId()) + " got mac address: " + macs.getMacAddress().get(0));
+                logger.info("VMI " + _manager.getVifNameByVmUuid(vm.getUuid(), nicVO.getDeviceId()) + " got mac address: " + macs.getMacAddress().get(0));
                 nic.setMacAddress(macs.getMacAddress().get(0));
             }
         }
 
         if (nic.getIPv4Address() == null) {
-            s_logger.debug("Allocated IP address " + ipModel.getAddress());
+            logger.debug("Allocated IP address " + ipModel.getAddress());
             nic.setIPv4Address(ipModel.getAddress());
             if (network.getCidr() != null) {
                 nic.setIPv4Netmask(NetUtils.cidr2Netmask(network.getCidr()));
@@ -298,7 +296,7 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru {
     @Override
     public boolean release(NicProfile nic, VirtualMachineProfile vm, String reservationId) {
 
-        s_logger.debug("release NicProfile " + nic.getId());
+        logger.debug("release NicProfile " + nic.getId());
 
         return true;
     }
@@ -308,7 +306,7 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru {
      */
     @Override
     public void deallocate(Network network, NicProfile nic, VirtualMachineProfile vm) {
-        s_logger.debug("deallocate NicProfile " + nic.getId() + " on " + network.getName());
+        logger.debug("deallocate NicProfile " + nic.getId() + " on " + network.getName());
         NicVO nicVO = _nicDao.findById(nic.getId());
         assert nicVO != null;
 
@@ -332,7 +330,7 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru {
             try {
                 vmModel.delete(_manager.getModelController());
             } catch (IOException ex) {
-                s_logger.warn("virtual-machine delete", ex);
+                logger.warn("virtual-machine delete", ex);
                 return;
             }
         }
@@ -342,12 +340,12 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru {
     @Override
     public void updateNicProfile(NicProfile profile, Network network) {
         // TODO Auto-generated method stub
-        s_logger.debug("update NicProfile " + profile.getId() + " on " + network.getName());
+        logger.debug("update NicProfile " + profile.getId() + " on " + network.getName());
     }
 
     @Override
     public void shutdown(NetworkProfile network, NetworkOffering offering) {
-        s_logger.debug("NetworkGuru shutdown");
+        logger.debug("NetworkGuru shutdown");
         VirtualNetworkModel vnModel = _manager.getDatabase().lookupVirtualNetwork(network.getUuid(), _manager.getCanonicalName(network), network.getTrafficType());
         if (vnModel == null) {
             return;
@@ -356,21 +354,21 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru {
             _manager.getDatabase().getVirtualNetworks().remove(vnModel);
             vnModel.delete(_manager.getModelController());
         } catch (IOException e) {
-            s_logger.warn("virtual-network delete", e);
+            logger.warn("virtual-network delete", e);
         }
     }
 
     @Override
     public boolean trash(Network network, NetworkOffering offering) {
         // TODO Auto-generated method stub
-        s_logger.debug("NetworkGuru trash");
+        logger.debug("NetworkGuru trash");
         return true;
     }
 
     @Override
     public void updateNetworkProfile(NetworkProfile networkProfile) {
         // TODO Auto-generated method stub
-        s_logger.debug("NetworkGuru updateNetworkProfile");
+        logger.debug("NetworkGuru updateNetworkProfile");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailManagerImpl.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailManagerImpl.java
index cc87aa5..b5abd76 100644
--- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailManagerImpl.java
+++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailManagerImpl.java
@@ -50,7 +50,6 @@ import org.apache.cloudstack.network.contrail.model.ModelController;
 import org.apache.cloudstack.network.contrail.model.VirtualNetworkModel;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
 
 import com.cloud.configuration.ConfigurationManager;
 import com.cloud.configuration.ConfigurationService;
@@ -145,7 +144,6 @@ public class ContrailManagerImpl extends ManagerBase implements ContrailManager
     @Inject
     NetworkACLDao _networkAclDao;
 
-    private static final Logger s_logger = Logger.getLogger(ContrailManager.class);
 
     private ApiConnector _api;
 
@@ -175,8 +173,8 @@ public class ContrailManagerImpl extends ManagerBase implements ContrailManager
         try {
             _dbSyncTimer.schedule(new DBSyncTask(), 0, _dbSyncInterval);
         } catch (Exception ex) {
-            s_logger.debug("Unable to start DB Sync timer " + ex.getMessage());
-            s_logger.debug("timer start", ex);
+            logger.debug("Unable to start DB Sync timer " + ex.getMessage());
+            logger.debug("timer start", ex);
         }
         return true;
     }
@@ -340,10 +338,10 @@ public class ContrailManagerImpl extends ManagerBase implements ContrailManager
             }
             _api = ApiConnectorFactory.build(hostname, port);
         } catch (IOException ex) {
-            s_logger.warn("Unable to read " + configuration, ex);
+            logger.warn("Unable to read " + configuration, ex);
             throw new ConfigurationException();
         } catch (Exception ex) {
-            s_logger.debug("Exception in configure: " + ex);
+            logger.debug("Exception in configure: " + ex);
             ex.printStackTrace();
             throw new ConfigurationException();
         } finally {
@@ -360,7 +358,7 @@ public class ContrailManagerImpl extends ManagerBase implements ContrailManager
                     Provider.JuniperContrailVpcRouter);
             _vpcOffering = locateVpcOffering();
         }catch (Exception ex) {
-            s_logger.debug("Exception in locating network offerings: " + ex);
+            logger.debug("Exception in locating network offerings: " + ex);
             ex.printStackTrace();
             throw new ConfigurationException();
         }
@@ -524,12 +522,12 @@ public class ContrailManagerImpl extends ManagerBase implements ContrailManager
     public void syncNetworkDB(short syncMode) throws IOException {
         if (_dbSync.syncAll(syncMode) == ServerDBSync.SYNC_STATE_OUT_OF_SYNC) {
             if (syncMode == DBSyncGeneric.SYNC_MODE_CHECK) {
-                s_logger.info("# Cloudstack DB & VNC are out of sync #");
+                logger.info("# Cloudstack DB & VNC are out of sync #");
             } else {
-                s_logger.info("# Cloudstack DB & VNC were out of sync, performed re-sync operation #");
+                logger.info("# Cloudstack DB & VNC were out of sync, performed re-sync operation #");
             }
         } else {
-            s_logger.info("# Cloudstack DB & VNC are in sync #");
+            logger.info("# Cloudstack DB & VNC are in sync #");
         }
     }
 
@@ -539,13 +537,13 @@ public class ContrailManagerImpl extends ManagerBase implements ContrailManager
         @Override
         public void run() {
             try {
-                s_logger.debug("DB Sync task is running");
+                logger.debug("DB Sync task is running");
                 syncNetworkDB(_syncMode);
                 // Change to check mode
                 _syncMode = DBSyncGeneric.SYNC_MODE_CHECK;
             } catch (Exception ex) {
-                s_logger.debug(ex);
-                s_logger.info("Unable to sync network db");
+                logger.debug(ex);
+                logger.info("Unable to sync network db");
             }
         }
     }
@@ -596,7 +594,7 @@ public class ContrailManagerImpl extends ManagerBase implements ContrailManager
         sc.setParameters("trafficType", types.toArray());
         List<NetworkVO> dbNets = _networksDao.search(sc, null);
         if (dbNets == null) {
-            s_logger.debug("no system networks for the given traffic types: " + types.toString());
+            logger.debug("no system networks for the given traffic types: " + types.toString());
             dbNets = new ArrayList<NetworkVO>();
         }
 
@@ -671,7 +669,7 @@ public class ContrailManagerImpl extends ManagerBase implements ContrailManager
 
         List<NetworkVO> dbNets = _networksDao.search(sc, null);
         if (dbNets == null) {
-            s_logger.debug("no juniper managed networks for the given traffic types: " + types.toString());
+            logger.debug("no juniper managed networks for the given traffic types: " + types.toString());
             dbNets = new ArrayList<NetworkVO>();
         }
 
@@ -713,7 +711,7 @@ public class ContrailManagerImpl extends ManagerBase implements ContrailManager
         sc.setParameters("vpcOffering", getVpcOffering().getId());
         List<VpcVO> vpcs = _vpcDao.search(sc, null);
         if (vpcs == null || vpcs.size() == 0) {
-            s_logger.debug("no vpcs found");
+            logger.debug("no vpcs found");
             return null;
         }
         return vpcs;
@@ -737,7 +735,7 @@ public class ContrailManagerImpl extends ManagerBase implements ContrailManager
         sc.setParameters("vpcId", vpcIds.toArray());
         List<NetworkACLVO> acls = _networkAclDao.search(sc, null);
         if (acls == null || acls.size() == 0) {
-            s_logger.debug("no acls found");
+            logger.debug("no acls found");
             return null;
         }
         /* only return if acl is associated to any network */
@@ -761,7 +759,7 @@ public class ContrailManagerImpl extends ManagerBase implements ContrailManager
         List<NetworkVO> dbNets = findManagedNetworks(null);
 
         if (dbNets == null || dbNets.isEmpty()) {
-            s_logger.debug("Juniper managed networks is empty");
+            logger.debug("Juniper managed networks is empty");
             return null;
         }
 
@@ -783,7 +781,7 @@ public class ContrailManagerImpl extends ManagerBase implements ContrailManager
 
         List<IPAddressVO> publicIps = _ipAddressDao.search(sc, null);
         if (publicIps == null) {
-            s_logger.debug("no public ips");
+            logger.debug("no public ips");
             return null;
         }
 
@@ -808,7 +806,7 @@ public class ContrailManagerImpl extends ManagerBase implements ContrailManager
                         vnModel.update(getModelController());
                     }
                 } catch (Exception ex) {
-                    s_logger.warn("virtual-network update: ", ex);
+                    logger.warn("virtual-network update: ", ex);
                 }
                 getDatabase().getVirtualNetworks().add(vnModel);
             }
@@ -923,7 +921,7 @@ public class ContrailManagerImpl extends ManagerBase implements ContrailManager
             }
             getDatabase().getVirtualNetworks().add(vnModel);
         } catch (Exception ex) {
-            s_logger.warn("virtual-network update: ", ex);
+            logger.warn("virtual-network update: ", ex);
         }
         return vnModel;
     }
@@ -943,7 +941,7 @@ public class ContrailManagerImpl extends ManagerBase implements ContrailManager
                 fipPoolModel.update(getModelController());
                 vnModel.setFipPoolModel(fipPoolModel);
             } catch (Exception ex) {
-                s_logger.warn("floating-ip-pool create: ", ex);
+                logger.warn("floating-ip-pool create: ", ex);
                 return false;
             }
         }
@@ -957,7 +955,7 @@ public class ContrailManagerImpl extends ManagerBase implements ContrailManager
             try {
                 fipModel.update(getModelController());
             } catch (Exception ex) {
-                s_logger.warn("floating-ip create: ", ex);
+                logger.warn("floating-ip create: ", ex);
                 return false;
             }
         }
@@ -974,7 +972,7 @@ public class ContrailManagerImpl extends ManagerBase implements ContrailManager
             try {
                 fipModel.destroy(getModelController());
             } catch (IOException ex) {
-                s_logger.warn("floating ip delete", ex);
+                logger.warn("floating ip delete", ex);
                 return false;
             }
             fipPoolModel.removeSuccessor(fipModel);
@@ -998,7 +996,7 @@ public class ContrailManagerImpl extends ManagerBase implements ContrailManager
         try {
             fipPool = (FloatingIpPool)_api.findByFQN(FloatingIpPool.class, fipPoolName);
         } catch (Exception ex) {
-            s_logger.debug(ex);
+            logger.debug(ex);
         }
         if (fipPool == null) {
             return null;
@@ -1008,7 +1006,7 @@ public class ContrailManagerImpl extends ManagerBase implements ContrailManager
             try {
                 return (List<FloatingIp>)_api.getObjects(FloatingIp.class, ips);
             } catch (IOException ex) {
-                s_logger.debug(ex);
+                logger.debug(ex);
                 return null;
             }
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailVpcElementImpl.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailVpcElementImpl.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailVpcElementImpl.java
index 4a72fcb..11c93a4 100644
--- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailVpcElementImpl.java
+++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailVpcElementImpl.java
@@ -26,7 +26,6 @@ import javax.inject.Inject;
 import org.apache.cloudstack.network.contrail.model.VirtualNetworkModel;
 import org.apache.cloudstack.network.contrail.model.NetworkPolicyModel;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.deploy.DeployDestination;
@@ -48,8 +47,6 @@ import com.cloud.vm.ReservationContext;
 @Component
 @Local(value = {NetworkACLServiceProvider.class, VpcProvider.class, ContrailElementImpl.class})
 public class ContrailVpcElementImpl extends ContrailElementImpl implements NetworkACLServiceProvider, VpcProvider {
-    private static final Logger s_logger =
-            Logger.getLogger(ContrailElement.class);
 
     @Inject
     NetworkACLDao _networkACLDao;
@@ -65,7 +62,7 @@ public class ContrailVpcElementImpl extends ContrailElementImpl implements Netwo
             ReservationContext context) throws ConcurrentOperationException,
             ResourceUnavailableException, InsufficientCapacityException {
         // TODO Auto-generated method stub
-        s_logger.debug("NetworkElement implementVpc");
+        logger.debug("NetworkElement implementVpc");
         return true;
     }
 
@@ -73,7 +70,7 @@ public class ContrailVpcElementImpl extends ContrailElementImpl implements Netwo
     public boolean shutdownVpc(Vpc vpc, ReservationContext context)
             throws ConcurrentOperationException, ResourceUnavailableException {
         // TODO Auto-generated method stub
-        s_logger.debug("NetworkElement shutdownVpc");
+        logger.debug("NetworkElement shutdownVpc");
         return true;
     }
 
@@ -81,7 +78,7 @@ public class ContrailVpcElementImpl extends ContrailElementImpl implements Netwo
     public boolean createPrivateGateway(PrivateGateway gateway)
             throws ConcurrentOperationException, ResourceUnavailableException {
         // TODO Auto-generated method stub
-        s_logger.debug("NetworkElement createPrivateGateway");
+        logger.debug("NetworkElement createPrivateGateway");
         return false;
     }
 
@@ -89,7 +86,7 @@ public class ContrailVpcElementImpl extends ContrailElementImpl implements Netwo
     public boolean deletePrivateGateway(PrivateGateway privateGateway)
             throws ConcurrentOperationException, ResourceUnavailableException {
         // TODO Auto-generated method stub
-        s_logger.debug("NetworkElement deletePrivateGateway");
+        logger.debug("NetworkElement deletePrivateGateway");
         return false;
     }
 
@@ -97,7 +94,7 @@ public class ContrailVpcElementImpl extends ContrailElementImpl implements Netwo
     public boolean applyStaticRoutes(Vpc vpc, List<StaticRouteProfile> routes)
             throws ResourceUnavailableException {
         // TODO Auto-generated method stub
-        s_logger.debug("NetworkElement applyStaticRoutes");
+        logger.debug("NetworkElement applyStaticRoutes");
         return true;
     }
 
@@ -105,9 +102,9 @@ public class ContrailVpcElementImpl extends ContrailElementImpl implements Netwo
     public boolean applyNetworkACLs(Network net,
             List<? extends NetworkACLItem> rules)
                     throws ResourceUnavailableException {
-        s_logger.debug("NetworkElement applyNetworkACLs");
+        logger.debug("NetworkElement applyNetworkACLs");
         if (rules == null || rules.isEmpty()) {
-            s_logger.debug("no rules to apply");
+            logger.debug("no rules to apply");
             return true;
         }
 
@@ -127,7 +124,7 @@ public class ContrailVpcElementImpl extends ContrailElementImpl implements Netwo
                     project = _manager.getDefaultVncProject();
                 }
             } catch (IOException ex) {
-                s_logger.warn("read project", ex);
+                logger.warn("read project", ex);
                 return false;
             }
             policyModel.setProject(project);
@@ -145,7 +142,7 @@ public class ContrailVpcElementImpl extends ContrailElementImpl implements Netwo
         try {
             policyModel.build(_manager.getModelController(), rules);
         } catch (Exception e) {
-            s_logger.error(e);
+            logger.error(e);
             e.printStackTrace();
             return false;
         }
@@ -156,7 +153,7 @@ public class ContrailVpcElementImpl extends ContrailElementImpl implements Netwo
             }
             _manager.getDatabase().getNetworkPolicys().add(policyModel);
         } catch (Exception ex) {
-            s_logger.error("network-policy update: ", ex);
+            logger.error("network-policy update: ", ex);
             ex.printStackTrace();
             return false;
         }
@@ -192,7 +189,7 @@ public class ContrailVpcElementImpl extends ContrailElementImpl implements Netwo
             List<? extends NetworkACLItem> rules)
                     throws ResourceUnavailableException {
         // TODO Auto-generated method stub
-        s_logger.debug("NetworkElement applyACLItemsToPrivateGw");
+        logger.debug("NetworkElement applyACLItemsToPrivateGw");
         return true;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ManagementNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ManagementNetworkGuru.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ManagementNetworkGuru.java
index fd29ca9..fa50512 100644
--- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ManagementNetworkGuru.java
+++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ManagementNetworkGuru.java
@@ -28,7 +28,6 @@ import java.util.Properties;
 
 import javax.naming.ConfigurationException;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.deploy.DeploymentPlan;
@@ -48,7 +47,6 @@ import com.cloud.utils.PropertiesUtil;
  */
 @Component
 public class ManagementNetworkGuru extends ContrailGuru {
-    private static final Logger s_logger = Logger.getLogger(ManagementNetworkGuru.class);
     private static final TrafficType[] TrafficTypes = {TrafficType.Management};
 
     private final String configuration = "contrail.properties";
@@ -71,7 +69,7 @@ public class ManagementNetworkGuru extends ContrailGuru {
             }
             inputFile = new FileInputStream(configFile);
         } catch (FileNotFoundException e) {
-            s_logger.error(e.getMessage());
+            logger.error(e.getMessage());
             throw new ConfigurationException(e.getMessage());
         }
 
@@ -79,14 +77,14 @@ public class ManagementNetworkGuru extends ContrailGuru {
         try {
             configProps.load(inputFile);
         } catch (IOException e) {
-            s_logger.error(e.getMessage());
+            logger.error(e.getMessage());
             throw new ConfigurationException(e.getMessage());
         } finally {
             closeAutoCloseable(inputFile, "error closing config file");
         }
         _mgmtCidr = configProps.getProperty("management.cidr");
         _mgmtGateway = configProps.getProperty("management.gateway");
-        s_logger.info("Management network " + _mgmtCidr + " gateway: " + _mgmtGateway);
+        logger.info("Management network " + _mgmtCidr + " gateway: " + _mgmtGateway);
         return true;
     }
 
@@ -123,7 +121,7 @@ public class ManagementNetworkGuru extends ContrailGuru {
             network.setCidr(_mgmtCidr);
             network.setGateway(_mgmtGateway);
         }
-        s_logger.debug("Allocated network " + userSpecified.getName() + (network.getCidr() == null ? "" : " subnet: " + network.getCidr()));
+        logger.debug("Allocated network " + userSpecified.getName() + (network.getCidr() == null ? "" : " subnet: " + network.getCidr()));
         return network;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java
index b5da604..357f8b9 100644
--- a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java
+++ b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java
@@ -24,7 +24,6 @@ import java.net.InetAddress;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
-import org.apache.log4j.Logger;
 
 import org.apache.cloudstack.acl.ControlledEntity;
 import org.apache.cloudstack.acl.RoleType;
@@ -63,7 +62,6 @@ import com.cloud.utils.db.TransactionCallbackNoReturn;
 import com.cloud.utils.db.TransactionStatus;
 
 public class MockAccountManager extends ManagerBase implements AccountManager {
-    private static final Logger s_logger = Logger.getLogger(MockAccountManager.class);
 
     @Inject
     AccountDao _accountDao;
@@ -88,7 +86,7 @@ public class MockAccountManager extends ManagerBase implements AccountManager {
             throw new ConfigurationException("Unable to find the system user using " + User.UID_SYSTEM);
         }
         CallContext.register(_systemUser, _systemAccount);
-        s_logger.info("MockAccountManager initialization successful");
+        logger.info("MockAccountManager initialization successful");
         return true;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java b/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java
index cb31ea4..fb1ed79 100644
--- a/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java
+++ b/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java
@@ -25,7 +25,6 @@ import java.util.Set;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
 
 import org.apache.cloudstack.api.response.ExternalFirewallResponse;
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
@@ -94,7 +93,6 @@ import com.cloud.vm.VirtualMachineProfile;
 public class JuniperSRXExternalFirewallElement extends ExternalFirewallDeviceManagerImpl implements SourceNatServiceProvider, FirewallServiceProvider,
         PortForwardingServiceProvider, IpDeployer, JuniperSRXFirewallElementService, StaticNatServiceProvider {
 
-    private static final Logger s_logger = Logger.getLogger(JuniperSRXExternalFirewallElement.class);
 
     private static final Map<Service, Map<Capability, String>> capabilities = setCapabilities();
 
@@ -131,18 +129,18 @@ public class JuniperSRXExternalFirewallElement extends ExternalFirewallDeviceMan
         DataCenter zone = _entityMgr.findById(DataCenter.class, network.getDataCenterId());
         if ((zone.getNetworkType() == NetworkType.Advanced && !(network.getGuestType() == Network.GuestType.Isolated || network.getGuestType() == Network.GuestType.Shared)) ||
             (zone.getNetworkType() == NetworkType.Basic && network.getGuestType() != Network.GuestType.Shared)) {
-            s_logger.trace("Element " + getProvider().getName() + "is not handling network type = " + network.getGuestType());
+            logger.trace("Element " + getProvider().getName() + "is not handling network type = " + network.getGuestType());
             return false;
         }
 
         if (service == null) {
             if (!_networkManager.isProviderForNetwork(getProvider(), network.getId())) {
-                s_logger.trace("Element " + getProvider().getName() + " is not a provider for the network " + network);
+                logger.trace("Element " + getProvider().getName() + " is not a provider for the network " + network);
                 return false;
             }
         } else {
             if (!_networkManager.isProviderSupportServiceInNetwork(network.getId(), service, getProvider())) {
-                s_logger.trace("Element " + getProvider().getName() + " doesn't support service " + service.getName() + " in the network " + network);
+                logger.trace("Element " + getProvider().getName() + " doesn't support service " + service.getName() + " in the network " + network);
                 return false;
             }
         }
@@ -157,7 +155,7 @@ public class JuniperSRXExternalFirewallElement extends ExternalFirewallDeviceMan
 
         // don't have to implement network is Basic zone
         if (zone.getNetworkType() == NetworkType.Basic) {
-            s_logger.debug("Not handling network implement in zone of type " + NetworkType.Basic);
+            logger.debug("Not handling network implement in zone of type " + NetworkType.Basic);
             return false;
         }
 
@@ -170,7 +168,7 @@ public class JuniperSRXExternalFirewallElement extends ExternalFirewallDeviceMan
         } catch (InsufficientCapacityException capacityException) {
             // TODO: handle out of capacity exception in more gracefule manner when multiple providers are present for
             // the network
-            s_logger.error("Fail to implement the JuniperSRX for network " + network, capacityException);
+            logger.error("Fail to implement the JuniperSRX for network " + network, capacityException);
             return false;
         }
     }
@@ -192,7 +190,7 @@ public class JuniperSRXExternalFirewallElement extends ExternalFirewallDeviceMan
 
         // don't have to implement network is Basic zone
         if (zone.getNetworkType() == NetworkType.Basic) {
-            s_logger.debug("Not handling network shutdown in zone of type " + NetworkType.Basic);
+            logger.debug("Not handling network shutdown in zone of type " + NetworkType.Basic);
             return false;
         }
 
@@ -527,7 +525,7 @@ public class JuniperSRXExternalFirewallElement extends ExternalFirewallDeviceMan
     @Override
     public boolean verifyServicesCombination(Set<Service> services) {
         if (!services.contains(Service.Firewall)) {
-            s_logger.warn("SRX must be used as Firewall Service Provider in the network");
+            logger.warn("SRX must be used as Firewall Service Provider in the network");
             return false;
         }
         return true;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/network-elements/midonet/src/com/cloud/network/element/MidoNetElement.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/midonet/src/com/cloud/network/element/MidoNetElement.java b/plugins/network-elements/midonet/src/com/cloud/network/element/MidoNetElement.java
index e1d9330..890d0d0 100644
--- a/plugins/network-elements/midonet/src/com/cloud/network/element/MidoNetElement.java
+++ b/plugins/network-elements/midonet/src/com/cloud/network/element/MidoNetElement.java
@@ -32,7 +32,6 @@ import javax.naming.ConfigurationException;
 import javax.ws.rs.core.MultivaluedMap;
 
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
-import org.apache.log4j.Logger;
 import org.midonet.client.MidonetApi;
 import org.midonet.client.dto.DtoRule;
 import org.midonet.client.dto.DtoRule.DtoRange;
@@ -92,7 +91,6 @@ import com.sun.jersey.core.util.MultivaluedMapImpl;
 public class MidoNetElement extends AdapterBase implements ConnectivityProvider, DhcpServiceProvider, SourceNatServiceProvider, StaticNatServiceProvider, IpDeployer,
         PortForwardingServiceProvider, FirewallServiceProvider, PluggableService {
 
-    private static final Logger s_logger = Logger.getLogger(MidoNetElement.class);
 
     private static final Map<Service, Map<Capability, String>> capabilities = setCapabilities();
 
@@ -147,7 +145,7 @@ public class MidoNetElement extends AdapterBase implements ConnectivityProvider,
         }
 
         if (this.api == null) {
-            s_logger.info("midonet API server address is  " + value);
+            logger.info("midonet API server address is  " + value);
             setMidonetApi(new MidonetApi(value));
             this.api.enableLogging();
         }
@@ -177,12 +175,12 @@ public class MidoNetElement extends AdapterBase implements ConnectivityProvider,
 
         if (service == null) {
             if (!_networkModel.isProviderForNetwork(getProvider(), network.getId())) {
-                s_logger.trace("Element " + getProvider().getName() + " is not a provider for the network " + network);
+                logger.trace("Element " + getProvider().getName() + " is not a provider for the network " + network);
                 return false;
             }
         } else {
             if (!_networkModel.isProviderSupportServiceInNetwork(network.getId(), service, getProvider())) {
-                s_logger.trace("Element " + getProvider().getName() + " doesn't support service " + service.getName() + " in the network " + network);
+                logger.trace("Element " + getProvider().getName() + " doesn't support service " + service.getName() + " in the network " + network);
                 return false;
             }
         }
@@ -287,7 +285,7 @@ public class MidoNetElement extends AdapterBase implements ConnectivityProvider,
 
     public boolean associatePublicIP(Network network, final List<? extends PublicIpAddress> ipAddress) throws ResourceUnavailableException {
 
-        s_logger.debug("associatePublicIP called with network: " + network.toString());
+        logger.debug("associatePublicIP called with network: " + network.toString());
         /*
          * Get Mido Router for this network and set source rules
          * These should only be allocated inside the for loop, because
@@ -352,7 +350,7 @@ public class MidoNetElement extends AdapterBase implements ConnectivityProvider,
     @Override
     public boolean applyIps(Network network, List<? extends PublicIpAddress> ipAddress, Set<Service> services) throws ResourceUnavailableException {
 
-        s_logger.debug("applyIps called with network: " + network.toString());
+        logger.debug("applyIps called with network: " + network.toString());
         if (!this.midoInNetwork(network)) {
             return false;
         }
@@ -376,7 +374,7 @@ public class MidoNetElement extends AdapterBase implements ConnectivityProvider,
      */
     @Override
     public IpDeployer getIpDeployer(Network network) {
-        s_logger.debug("getIpDeployer called with network " + network.toString());
+        logger.debug("getIpDeployer called with network " + network.toString());
         return this;
     }
 
@@ -387,7 +385,7 @@ public class MidoNetElement extends AdapterBase implements ConnectivityProvider,
     public boolean addDhcpEntry(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
         throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
 
-        s_logger.debug("addDhcpEntry called with network: " + network.toString() + " nic: " + nic.toString() + " vm: " + vm.toString());
+        logger.debug("addDhcpEntry called with network: " + network.toString() + " nic: " + nic.toString() + " vm: " + vm.toString());
         if (!this.midoInNetwork(network)) {
             return false;
         }
@@ -421,7 +419,7 @@ public class MidoNetElement extends AdapterBase implements ConnectivityProvider,
 
         // On DHCP subnet, add host using host details
         if (sub == null) {
-            s_logger.error("Failed to create DHCP subnet on Midonet bridge");
+            logger.error("Failed to create DHCP subnet on Midonet bridge");
             return false;
         } else {
             // Check if the host already exists - we may just be restarting an existing VM
@@ -580,7 +578,7 @@ public class MidoNetElement extends AdapterBase implements ConnectivityProvider,
      */
     @Override
     public boolean applyStaticNats(Network network, List<? extends StaticNat> rules) throws ResourceUnavailableException {
-        s_logger.debug("applyStaticNats called with network: " + network.toString());
+        logger.debug("applyStaticNats called with network: " + network.toString());
         if (!midoInNetwork(network)) {
             return false;
         }
@@ -728,7 +726,7 @@ public class MidoNetElement extends AdapterBase implements ConnectivityProvider,
     @Override
     public boolean implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
         ResourceUnavailableException, InsufficientCapacityException {
-        s_logger.debug("implement called with network: " + network.toString());
+        logger.debug("implement called with network: " + network.toString());
         if (!midoInNetwork(network)) {
             return false;
         }
@@ -748,7 +746,7 @@ public class MidoNetElement extends AdapterBase implements ConnectivityProvider,
     @Override
     public boolean prepare(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
         throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
-        s_logger.debug("prepare called with network: " + network.toString() + " nic: " + nic.toString() + " vm: " + vm.toString());
+        logger.debug("prepare called with network: " + network.toString() + " nic: " + nic.toString() + " vm: " + vm.toString());
         if (!midoInNetwork(network)) {
             return false;
         }
@@ -808,7 +806,7 @@ public class MidoNetElement extends AdapterBase implements ConnectivityProvider,
     @Override
     public boolean release(Network network, NicProfile nic, VirtualMachineProfile vm, ReservationContext context) throws ConcurrentOperationException,
         ResourceUnavailableException {
-        s_logger.debug("release called with network: " + network.toString() + " nic: " + nic.toString() + " vm: " + vm.toString());
+        logger.debug("release called with network: " + network.toString() + " nic: " + nic.toString() + " vm: " + vm.toString());
         if (!midoInNetwork(network)) {
             return false;
         }
@@ -848,7 +846,7 @@ public class MidoNetElement extends AdapterBase implements ConnectivityProvider,
 
     @Override
     public boolean shutdown(Network network, ReservationContext context, boolean cleanup) throws ConcurrentOperationException, ResourceUnavailableException {
-        s_logger.debug("shutdown called with network: " + network.toString());
+        logger.debug("shutdown called with network: " + network.toString());
         if (!midoInNetwork(network)) {
             return false;
         }
@@ -864,7 +862,7 @@ public class MidoNetElement extends AdapterBase implements ConnectivityProvider,
 
     @Override
     public boolean destroy(Network network, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException {
-        s_logger.debug("destroy called with network: " + network.toString());
+        logger.debug("destroy called with network: " + network.toString());
         if (!midoInNetwork(network)) {
             return false;
         }
@@ -913,7 +911,7 @@ public class MidoNetElement extends AdapterBase implements ConnectivityProvider,
 
     @Override
     public boolean applyPFRules(Network network, List<PortForwardingRule> rules) throws ResourceUnavailableException {
-        s_logger.debug("applyPFRules called with network " + network.toString());
+        logger.debug("applyPFRules called with network " + network.toString());
         if (!midoInNetwork(network)) {
             return false;
         }
@@ -1410,11 +1408,11 @@ public class MidoNetElement extends AdapterBase implements ConnectivityProvider,
 
             String networkUUIDStr = String.valueOf(networkID);
 
-            s_logger.debug("Attempting to create guest network bridge");
+            logger.debug("Attempting to create guest network bridge");
             try {
                 netBridge = api.addBridge().tenantId(accountUuid).name(networkUUIDStr).create();
             } catch (HttpInternalServerError ex) {
-                s_logger.warn("Bridge creation failed, retrying bridge get in case it now exists.", ex);
+                logger.warn("Bridge creation failed, retrying bridge get in case it now exists.", ex);
                 netBridge = getNetworkBridge(networkID, accountUuid);
             }
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetGuestNetworkGuru.java b/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetGuestNetworkGuru.java
index aaf2fca..024b5ed 100644
--- a/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetGuestNetworkGuru.java
+++ b/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetGuestNetworkGuru.java
@@ -22,7 +22,6 @@ package com.cloud.network.guru;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.dc.DataCenter.NetworkType;
@@ -47,7 +46,6 @@ import com.cloud.vm.VirtualMachineProfile;
 @Component
 @Local(value = NetworkGuru.class)
 public class MidoNetGuestNetworkGuru extends GuestNetworkGuru {
-    private static final Logger s_logger = Logger.getLogger(MidoNetGuestNetworkGuru.class);
 
     @Inject
     AccountDao _accountDao;
@@ -64,7 +62,7 @@ public class MidoNetGuestNetworkGuru extends GuestNetworkGuru {
             isMyIsolationMethod(physicalNetwork)) {
             return true;
         } else {
-            s_logger.trace("We only take care of Guest networks of type   " + Network.GuestType.Isolated + " in zone of type " + NetworkType.Advanced +
+            logger.trace("We only take care of Guest networks of type   " + Network.GuestType.Isolated + " in zone of type " + NetworkType.Advanced +
                 " using isolation method MIDO.");
             return false;
         }
@@ -72,15 +70,15 @@ public class MidoNetGuestNetworkGuru extends GuestNetworkGuru {
 
     @Override
     public Network design(NetworkOffering offering, DeploymentPlan plan, Network userSpecified, Account owner) {
-        s_logger.debug("design called");
+        logger.debug("design called");
         // Check if the isolation type of the related physical network is MIDO
         PhysicalNetworkVO physnet = _physicalNetworkDao.findById(plan.getPhysicalNetworkId());
         if (physnet == null || physnet.getIsolationMethods() == null || !physnet.getIsolationMethods().contains("MIDO")) {
-            s_logger.debug("Refusing to design this network, the physical isolation type is not MIDO");
+            logger.debug("Refusing to design this network, the physical isolation type is not MIDO");
             return null;
         }
 
-        s_logger.debug("Physical isolation type is MIDO, asking GuestNetworkGuru to design this network");
+        logger.debug("Physical isolation type is MIDO, asking GuestNetworkGuru to design this network");
         NetworkVO networkObject = (NetworkVO)super.design(offering, plan, userSpecified, owner);
         if (networkObject == null) {
             return null;
@@ -95,7 +93,7 @@ public class MidoNetGuestNetworkGuru extends GuestNetworkGuru {
     public Network implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context)
         throws InsufficientVirtualNetworkCapacityException {
         assert (network.getState() == Network.State.Implementing) : "Why are we implementing " + network;
-        s_logger.debug("implement called network: " + network.toString());
+        logger.debug("implement called network: " + network.toString());
 
         long dcId = dest.getDataCenter().getId();
 
@@ -126,7 +124,7 @@ public class MidoNetGuestNetworkGuru extends GuestNetworkGuru {
         String broadcastUriStr = accountUUIDStr + "." + String.valueOf(network.getId()) + ":" + routerName;
 
         implemented.setBroadcastUri(Networks.BroadcastDomainType.Mido.toUri(broadcastUriStr));
-        s_logger.debug("Broadcast URI set to " + broadcastUriStr);
+        logger.debug("Broadcast URI set to " + broadcastUriStr);
 
         return implemented;
     }
@@ -134,27 +132,27 @@ public class MidoNetGuestNetworkGuru extends GuestNetworkGuru {
     @Override
     public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
         throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException {
-        s_logger.debug("reserve called with network: " + network.toString() + " nic: " + nic.toString() + " vm: " + vm.toString());
+        logger.debug("reserve called with network: " + network.toString() + " nic: " + nic.toString() + " vm: " + vm.toString());
 
         super.reserve(nic, network, vm, dest, context);
     }
 
     @Override
     public boolean release(NicProfile nic, VirtualMachineProfile vm, String reservationId) {
-        s_logger.debug("release called with nic: " + nic.toString() + " vm: " + vm.toString());
+        logger.debug("release called with nic: " + nic.toString() + " vm: " + vm.toString());
         return super.release(nic, vm, reservationId);
     }
 
     @Override
     public void shutdown(NetworkProfile profile, NetworkOffering offering) {
-        s_logger.debug("shutdown called");
+        logger.debug("shutdown called");
 
         super.shutdown(profile, offering);
     }
 
     @Override
     public boolean trash(Network network, NetworkOffering offering) {
-        s_logger.debug("trash called with network: " + network.toString());
+        logger.debug("trash called with network: " + network.toString());
 
         return super.trash(network, offering);
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetPublicNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetPublicNetworkGuru.java b/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetPublicNetworkGuru.java
index bb1b6f9..078f95d 100644
--- a/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetPublicNetworkGuru.java
+++ b/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetPublicNetworkGuru.java
@@ -23,7 +23,6 @@ import java.net.URI;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
 
 import com.cloud.dc.DataCenter;
 import com.cloud.dc.Vlan;
@@ -57,7 +56,6 @@ import com.cloud.vm.VirtualMachineProfile;
 
 @Local(value = NetworkGuru.class)
 public class MidoNetPublicNetworkGuru extends PublicNetworkGuru {
-    private static final Logger s_logger = Logger.getLogger(MidoNetPublicNetworkGuru.class);
 
     // Inject any stuff we need to use (DAOs etc)
     @Inject
@@ -72,7 +70,7 @@ public class MidoNetPublicNetworkGuru extends PublicNetworkGuru {
     // Only change is to make broadcast domain type Mido
     @Override
     public Network design(NetworkOffering offering, DeploymentPlan plan, Network network, Account owner) {
-        s_logger.debug("design called with network: " + network);
+        logger.debug("design called with network: " + network);
         if (!canHandle(offering)) {
             return null;
         }
@@ -121,7 +119,7 @@ public class MidoNetPublicNetworkGuru extends PublicNetworkGuru {
 
     @Override
     public void updateNicProfile(NicProfile profile, Network network) {
-        s_logger.debug("updateNicProfile called with network: " + network + " profile: " + profile);
+        logger.debug("updateNicProfile called with network: " + network + " profile: " + profile);
 
         DataCenter dc = _dcDao.findById(network.getDataCenterId());
         if (profile != null) {
@@ -137,7 +135,7 @@ public class MidoNetPublicNetworkGuru extends PublicNetworkGuru {
         if (nic == null) {
             nic = new NicProfile(Nic.ReservationStrategy.Create, null, null, null, null);
         }
-        s_logger.debug("allocate called with network: " + network + " nic: " + nic + " vm: " + vm);
+        logger.debug("allocate called with network: " + network + " nic: " + nic + " vm: " + vm);
         DataCenter dc = _dcDao.findById(network.getDataCenterId());
 
         if (nic.getRequestedIPv4() != null) {
@@ -162,7 +160,7 @@ public class MidoNetPublicNetworkGuru extends PublicNetworkGuru {
     @Override
     public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
         throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException {
-        s_logger.debug("reserve called with network: " + network + " nic: " + nic + " vm: " + vm);
+        logger.debug("reserve called with network: " + network + " nic: " + nic + " vm: " + vm);
         if (nic.getIPv4Address() == null) {
             getIp(nic, dest.getDataCenter(), vm, network);
         }
@@ -170,14 +168,14 @@ public class MidoNetPublicNetworkGuru extends PublicNetworkGuru {
 
     @Override
     public boolean release(NicProfile nic, VirtualMachineProfile vm, String reservationId) {
-        s_logger.debug("release called with nic: " + nic + " vm: " + vm);
+        logger.debug("release called with nic: " + nic + " vm: " + vm);
         return true;
     }
 
     @Override
     public Network implement(Network network, NetworkOffering offering, DeployDestination destination, ReservationContext context)
         throws InsufficientVirtualNetworkCapacityException {
-        s_logger.debug("implement called with network: " + network);
+        logger.debug("implement called with network: " + network);
         long dcId = destination.getDataCenter().getId();
 
         //get physical network id
@@ -204,9 +202,9 @@ public class MidoNetPublicNetworkGuru extends PublicNetworkGuru {
     @Override
     @DB
     public void deallocate(Network network, NicProfile nic, VirtualMachineProfile vm) {
-        s_logger.debug("deallocate called with network: " + network + " nic: " + nic + " vm: " + vm);
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("public network deallocate network: networkId: " + nic.getNetworkId() + ", ip: " + nic.getIPv4Address());
+        logger.debug("deallocate called with network: " + network + " nic: " + nic + " vm: " + vm);
+        if (logger.isDebugEnabled()) {
+            logger.debug("public network deallocate network: networkId: " + nic.getNetworkId() + ", ip: " + nic.getIPv4Address());
         }
 
         final IPAddressVO ip = _ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), nic.getIPv4Address());
@@ -221,19 +219,19 @@ public class MidoNetPublicNetworkGuru extends PublicNetworkGuru {
         }
         nic.deallocate();
 
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Deallocated nic: " + nic);
+        if (logger.isDebugEnabled()) {
+            logger.debug("Deallocated nic: " + nic);
         }
     }
 
     @Override
     public void shutdown(NetworkProfile network, NetworkOffering offering) {
-        s_logger.debug("shutdown called with network: " + network);
+        logger.debug("shutdown called with network: " + network);
     }
 
     @Override
     public boolean trash(Network network, NetworkOffering offering) {
-        s_logger.debug("trash called with network: " + network);
+        logger.debug("trash called with network: " + network);
         return true;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java b/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java
index 9e679f6..b25ba7e 100644
--- a/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java
+++ b/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java
@@ -27,7 +27,6 @@ import java.util.Set;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
 
 import com.google.gson.Gson;
 
@@ -121,7 +120,6 @@ import com.cloud.vm.VirtualMachineProfile;
 public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl implements LoadBalancingServiceProvider, NetscalerLoadBalancerElementService,
         ExternalLoadBalancerDeviceManager, IpDeployer, StaticNatServiceProvider, GslbServiceProvider {
 
-    private static final Logger s_logger = Logger.getLogger(NetscalerElement.class);
     public static final AutoScaleCounterType AutoScaleCounterSnmp = new AutoScaleCounterType("snmp");
     public static final AutoScaleCounterType AutoScaleCounterNetscaler = new AutoScaleCounterType("netscaler");
 
@@ -166,7 +164,7 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl
             (zone.getNetworkType() == NetworkType.Basic && config.getGuestType() == Network.GuestType.Shared && config.getTrafficType() == TrafficType.Guest);
 
         if (!(handleInAdvanceZone || handleInBasicZone)) {
-            s_logger.trace("Not handling network with Type  " + config.getGuestType() + " and traffic type " + config.getTrafficType() + " in zone of type " +
+            logger.trace("Not handling network with Type  " + config.getGuestType() + " and traffic type " + config.getTrafficType() + " in zone of type " +
                 zone.getNetworkType());
             return false;
         }
@@ -189,7 +187,7 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl
         }
 
         if (_ntwkSrvcDao.canProviderSupportServiceInNetwork(guestConfig.getId(), Service.StaticNat, Network.Provider.Netscaler) && !isBasicZoneNetwok(guestConfig)) {
-            s_logger.error("NetScaler provider can not be Static Nat service provider for the network " + guestConfig.getGuestType() + " and traffic type " +
+            logger.error("NetScaler provider can not be Static Nat service provider for the network " + guestConfig.getGuestType() + " and traffic type " +
                 guestConfig.getTrafficType());
             return false;
         }
@@ -346,7 +344,7 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl
             uri = new URI(cmd.getUrl());
         } catch (Exception e) {
             String msg = "Error parsing the url parameter specified in addNetscalerLoadBalancer command due to " + e.getMessage();
-            s_logger.debug(msg);
+            logger.debug(msg);
             throw new InvalidParameterValueException(msg);
         }
         Map<String, String> configParams = new HashMap<String, String>();
@@ -357,7 +355,7 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl
 
         if (dedicatedUse && !deviceName.equals(NetworkDevice.NetscalerVPXLoadBalancer.getName())) {
             String msg = "Only Netscaler VPX load balancers can be specified for dedicated use";
-            s_logger.debug(msg);
+            logger.debug(msg);
             throw new InvalidParameterValueException(msg);
         }
 
@@ -365,13 +363,13 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl
 
             if (!deviceName.equals(NetworkDevice.NetscalerVPXLoadBalancer.getName()) && !deviceName.equals(NetworkDevice.NetscalerMPXLoadBalancer.getName())) {
                 String msg = "Only Netscaler VPX or MPX load balancers can be specified as GSLB service provider";
-                s_logger.debug(msg);
+                logger.debug(msg);
                 throw new InvalidParameterValueException(msg);
             }
 
             if (cmd.getSitePublicIp() == null || cmd.getSitePrivateIp() == null) {
                 String msg = "Public and Privae IP needs to provided for NetScaler that will be GSLB provider";
-                s_logger.debug(msg);
+                logger.debug(msg);
                 throw new InvalidParameterValueException(msg);
             }
 
@@ -676,15 +674,15 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl
 
         // NetScaler can only act as Lb and Static Nat service provider
         if (services != null && !services.isEmpty() && !netscalerServices.containsAll(services)) {
-            s_logger.warn("NetScaler network element can only support LB and Static NAT services and service combination " + services + " is not supported.");
+            logger.warn("NetScaler network element can only support LB and Static NAT services and service combination " + services + " is not supported.");
 
             StringBuffer buff = new StringBuffer();
             for (Service service : services) {
                 buff.append(service.getName());
                 buff.append(" ");
             }
-            s_logger.warn("NetScaler network element can only support LB and Static NAT services and service combination " + buff.toString() + " is not supported.");
-            s_logger.warn("NetScaler network element can only support LB and Static NAT services and service combination " + services + " is not supported.");
+            logger.warn("NetScaler network element can only support LB and Static NAT services and service combination " + buff.toString() + " is not supported.");
+            logger.warn("NetScaler network element can only support LB and Static NAT services and service combination " + services + " is not supported.");
             return false;
         }
 
@@ -720,14 +718,14 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl
                 lbDeviceVO = allocateLoadBalancerForNetwork(network);
             } catch (Exception e) {
                 errMsg = "Could not allocate a NetSclaer load balancer for configuring elastic load balancer rules due to " + e.getMessage();
-                s_logger.error(errMsg);
+                logger.error(errMsg);
                 throw new ResourceUnavailableException(errMsg, this.getClass(), 0);
             }
         }
 
         if (!isNetscalerDevice(lbDeviceVO.getDeviceName())) {
             errMsg = "There are no NetScaler load balancer assigned for this network. So NetScaler element can not be handle elastic load balancer rules.";
-            s_logger.error(errMsg);
+            logger.error(errMsg);
             throw new ResourceUnavailableException(errMsg, this.getClass(), 0);
         }
 
@@ -765,7 +763,7 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl
                 String msg =
                     "Unable to apply elastic load balancer rules to the external load balancer appliance in zone " + network.getDataCenterId() + " due to: " + details +
                         ".";
-                s_logger.error(msg);
+                logger.error(msg);
                 throw new ResourceUnavailableException(msg, DataCenter.class, network.getDataCenterId());
             }
         }
@@ -791,14 +789,14 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl
                         lbDevice = allocateLoadBalancerForNetwork(config);
                     } catch (Exception e) {
                         errMsg = "Could not allocate a NetSclaer load balancer for configuring static NAT rules due to" + e.getMessage();
-                        s_logger.error(errMsg);
+                        logger.error(errMsg);
                         throw new ResourceUnavailableException(errMsg, this.getClass(), 0);
                     }
                 }
 
                 if (!isNetscalerDevice(lbDevice.getDeviceName())) {
                     errMsg = "There are no NetScaler load balancer assigned for this network. So NetScaler element will not be handling the static nat rules.";
-                    s_logger.error(errMsg);
+                    logger.error(errMsg);
                     throw new ResourceUnavailableException(errMsg, this.getClass(), 0);
                 }
                 SetStaticNatRulesAnswer answer = null;
@@ -827,7 +825,7 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl
                         ExternalLoadBalancerDeviceVO lbDevice = getNetScalerForEIP(rule);
                         if (lbDevice == null) {
                             String errMsg = "There is no NetScaler device configured to perform EIP to guest IP address: " + rule.getDestIpAddress();
-                            s_logger.error(errMsg);
+                            logger.error(errMsg);
                             throw new ResourceUnavailableException(errMsg, this.getClass(), 0);
                         }
 
@@ -842,7 +840,7 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl
                         SetStaticNatRulesAnswer answer = (SetStaticNatRulesAnswer)_agentMgr.send(lbDevice.getHostId(), cmd);
                         if (answer == null) {
                             String errMsg = "Failed to configure INAT rule on NetScaler device " + lbDevice.getHostId();
-                            s_logger.error(errMsg);
+                            logger.error(errMsg);
                             throw new ResourceUnavailableException(errMsg, this.getClass(), 0);
                         }
                     }
@@ -851,7 +849,7 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl
             }
             return true;
         } catch (Exception e) {
-            s_logger.error("Failed to configure StaticNat rule due to " + e.getMessage());
+            logger.error("Failed to configure StaticNat rule due to " + e.getMessage());
             return false;
         }
     }
@@ -887,13 +885,13 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl
         ExternalLoadBalancerDeviceVO lbDeviceVO = getExternalLoadBalancerForNetwork(network);
 
         if (lbDeviceVO == null) {
-            s_logger.warn("There is no external load balancer device assigned to this network either network is not implement are already shutdown so just returning");
+            logger.warn("There is no external load balancer device assigned to this network either network is not implement are already shutdown so just returning");
             return null;
         }
 
         if (!isNetscalerDevice(lbDeviceVO.getDeviceName())) {
             errMsg = "There are no NetScaler load balancer assigned for this network. So NetScaler element can not be handle elastic load balancer rules.";
-            s_logger.error(errMsg);
+            logger.error(errMsg);
             throw new ResourceUnavailableException(errMsg, this.getClass(), 0);
         }
 
@@ -939,10 +937,10 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl
                     return getLBHealthChecks(network, lbrules);
                 }
             } catch (ResourceUnavailableException e) {
-                s_logger.error("Error in getting the LB Rules from NetScaler " + e);
+                logger.error("Error in getting the LB Rules from NetScaler " + e);
             }
         } else {
-            s_logger.error("Network cannot handle to LB service ");
+            logger.error("Network cannot handle to LB service ");
         }
         return null;
     }
@@ -961,7 +959,7 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl
         ExternalLoadBalancerDeviceVO nsGslbProvider = findGslbProvider(zoneId, physicalNetworkId);
         if (nsGslbProvider == null) {
             String msg = "Unable to find a NetScaler configured as gslb service provider in zone " + zoneId;
-            s_logger.debug(msg);
+            logger.debug(msg);
             throw new ResourceUnavailableException(msg, DataCenter.class, zoneId);
         }
 
@@ -972,7 +970,7 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl
         Answer answer = _agentMgr.easySend(zoneGslbProviderHosId, gslbConfigCmd);
         if (answer == null || !answer.getResult()) {
             String msg = "Unable to apply global load balancer rule to the gslb service provider in zone " + zoneId;
-            s_logger.debug(msg);
+            logger.debug(msg);
             throw new ResourceUnavailableException(msg, DataCenter.class, zoneId);
         }
 
@@ -1031,7 +1029,7 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl
             if (schemeCaps != null) {
                 for (LoadBalancingRule rule : rules) {
                     if (!schemeCaps.contains(rule.getScheme().toString())) {
-                        s_logger.debug("Scheme " + rules.get(0).getScheme() + " is not supported by the provider " + this.getName());
+                        logger.debug("Scheme " + rules.get(0).getScheme() + " is not supported by the provider " + this.getName());
                         return false;
                     }
                 }


Mime
View raw message