http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc02940/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/firewall/FirewallManagerImpl.java 
b/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
index 1281267..b4e3bc3 100644
--- a/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
+++ b/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
@@ -27,6 +27,7 @@ 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.api.command.user.firewall.IListFirewallRulesCmd;
@@ -99,6 +100,7 @@ import com.cloud.vm.dao.UserVmDao;
 @Component
 @Local(value = {FirewallService.class, FirewallManager.class})
 public class FirewallManagerImpl extends ManagerBase implements 
FirewallService, FirewallManager, NetworkRuleApplier {
+    private static final Logger s_logger = 
Logger.getLogger(FirewallManagerImpl.class);
 
     @Inject
     FirewallRulesDao _firewallDao;
@@ -154,7 +156,7 @@ public class FirewallManagerImpl extends ManagerBase 
implements FirewallService,
 
     @Override
     public boolean start() {
-        logger.info("Firewall provider list is " + 
_firewallElements.iterator().next());
+        s_logger.info("Firewall provider list is " + 
_firewallElements.iterator().next());
         return super.start();
     }
 
@@ -435,8 +437,8 @@ public class FirewallManagerImpl extends ManagerBase 
implements FirewallService,
             }
         }
 
-        if (logger.isDebugEnabled()) {
-            logger.debug("No network rule conflicts detected for " + newRule + 
" against " + (rules.size() - 1) + " existing rules");
+        if (s_logger.isDebugEnabled()) {
+            s_logger.debug("No network rule conflicts detected for " + newRule 
+ " against " + (rules.size() - 1) + " existing rules");
         }
     }
 
@@ -523,12 +525,12 @@ public class FirewallManagerImpl extends ManagerBase 
implements FirewallService,
     public boolean applyRules(List<? extends FirewallRule> rules, boolean 
continueOnError, boolean updateRulesInDB) throws ResourceUnavailableException {
         boolean success = true;
         if (rules == null || rules.size() == 0) {
-            logger.debug("There are no rules to forward to the network 
elements");
+            s_logger.debug("There are no rules to forward to the network 
elements");
             return true;
         }
         Purpose purpose = rules.get(0).getPurpose();
         if (!_ipAddrMgr.applyRules(rules, purpose, this, continueOnError)) {
-            logger.warn("Rules are not completely applied");
+            s_logger.warn("Rules are not completely applied");
             return false;
         } else {
             if (updateRulesInDB) {
@@ -536,7 +538,7 @@ public class FirewallManagerImpl extends ManagerBase 
implements FirewallService,
                     if (rule.getState() == FirewallRule.State.Revoke) {
                         FirewallRuleVO relatedRule = 
_firewallDao.findByRelatedId(rule.getId());
                         if (relatedRule != null) {
-                            logger.warn("Can't remove the firewall rule id=" + 
rule.getId() + " as it has related firewall rule id=" + relatedRule.getId() +
+                            s_logger.warn("Can't remove the firewall rule id=" 
+ rule.getId() + " as it has related firewall rule id=" + relatedRule.getId() +
                                 "; leaving it in Revoke state");
                             success = false;
                         } else {
@@ -603,7 +605,7 @@ public class FirewallManagerImpl extends ManagerBase 
implements FirewallService,
             break;*/
         default:
                 assert (false) : "Unexpected fall through in applying rules to 
the network elements";
-            logger.error("FirewallManager cannot process rules of type " + 
purpose);
+            s_logger.error("FirewallManager cannot process rules of type " + 
purpose);
             throw new CloudRuntimeException("FirewallManager cannot process 
rules of type " + purpose);
         }
         return handled;
@@ -639,7 +641,7 @@ public class FirewallManagerImpl extends ManagerBase 
implements FirewallService,
     public boolean applyFirewallRules(List<FirewallRuleVO> rules, boolean 
continueOnError, Account caller) {
 
         if (rules.size() == 0) {
-            logger.debug("There are no firewall rules to apply");
+            s_logger.debug("There are no firewall rules to apply");
             return true;
         }
 
@@ -657,7 +659,7 @@ public class FirewallManagerImpl extends ManagerBase 
implements FirewallService,
                 return false;
             }
         } catch (ResourceUnavailableException ex) {
-            logger.warn("Failed to apply firewall rules due to : "+ 
ex.getMessage());
+            s_logger.warn("Failed to apply firewall rules due to : "+ 
ex.getMessage());
             return false;
         }
 
@@ -667,7 +669,7 @@ public class FirewallManagerImpl extends ManagerBase 
implements FirewallService,
     @Override
     public boolean applyDefaultEgressFirewallRule(Long networkId, boolean 
defaultPolicy, boolean add) throws ResourceUnavailableException {
 
-        logger.debug("applying default firewall egress rules ");
+        s_logger.debug("applying default firewall egress rules ");
 
         NetworkVO network = _networkDao.findById(networkId);
         List<String> sourceCidr = new ArrayList<String>();
@@ -686,7 +688,7 @@ public class FirewallManagerImpl extends ManagerBase 
implements FirewallService,
                 return  false;
             }
         } catch (ResourceUnavailableException ex) {
-            logger.warn("Failed to apply default egress rules for guest 
network due to ", ex);
+            s_logger.warn("Failed to apply default egress rules for guest 
network due to ", ex);
             return false;
         }
         return true;
@@ -802,8 +804,8 @@ public class FirewallManagerImpl extends ManagerBase 
implements FirewallService,
         boolean generateUsageEvent = false;
 
         if (rule.getState() == State.Staged) {
-            if (logger.isDebugEnabled()) {
-                logger.debug("Found a rule that is still in stage state so 
just removing it: " + rule);
+            if (s_logger.isDebugEnabled()) {
+                s_logger.debug("Found a rule that is still in stage state so 
just removing it: " + rule);
             }
             removeRule(rule);
             generateUsageEvent = true;
@@ -832,8 +834,8 @@ public class FirewallManagerImpl extends ManagerBase 
implements FirewallService,
         List<FirewallRule> rules = new ArrayList<FirewallRule>();
 
         List<FirewallRuleVO> fwRules = 
_firewallDao.listByIpAndPurposeAndNotRevoked(ipId, Purpose.Firewall);
-        if (logger.isDebugEnabled()) {
-            logger.debug("Releasing " + fwRules.size() + " firewall rules for 
ip id=" + ipId);
+        if (s_logger.isDebugEnabled()) {
+            s_logger.debug("Releasing " + fwRules.size() + " firewall rules 
for ip id=" + ipId);
         }
 
         for (FirewallRuleVO rule : fwRules) {
@@ -849,8 +851,8 @@ public class FirewallManagerImpl extends ManagerBase 
implements FirewallService,
         // Now we check again in case more rules have been inserted.
         rules.addAll(_firewallDao.listByIpAndPurposeAndNotRevoked(ipId, 
Purpose.Firewall));
 
-        if (logger.isDebugEnabled()) {
-            logger.debug("Successfully released firewall rules for ip id=" + 
ipId + " and # of rules now = " + rules.size());
+        if (s_logger.isDebugEnabled()) {
+            s_logger.debug("Successfully released firewall rules for ip id=" + 
ipId + " and # of rules now = " + rules.size());
         }
 
         return rules.size() == 0;
@@ -879,8 +881,8 @@ public class FirewallManagerImpl extends ManagerBase 
implements FirewallService,
         List<FirewallRule> rules = new ArrayList<FirewallRule>();
 
         List<FirewallRuleVO> fwRules = 
_firewallDao.listByNetworkAndPurposeAndNotRevoked(networkId, Purpose.Firewall);
-        if (logger.isDebugEnabled()) {
-            logger.debug("Releasing " + fwRules.size() + " firewall rules for 
network id=" + networkId);
+        if (s_logger.isDebugEnabled()) {
+            s_logger.debug("Releasing " + fwRules.size() + " firewall rules 
for network id=" + networkId);
         }
 
         for (FirewallRuleVO rule : fwRules) {
@@ -896,8 +898,8 @@ public class FirewallManagerImpl extends ManagerBase 
implements FirewallService,
         // Now we check again in case more rules have been inserted.
         
rules.addAll(_firewallDao.listByNetworkAndPurposeAndNotRevoked(networkId, 
Purpose.Firewall));
 
-        if (logger.isDebugEnabled()) {
-            logger.debug("Successfully released firewall rules for network 
id=" + networkId + " and # of rules now = " + rules.size());
+        if (s_logger.isDebugEnabled()) {
+            s_logger.debug("Successfully released firewall rules for network 
id=" + networkId + " and # of rules now = " + rules.size());
         }
 
         return success && rules.size() == 0;
@@ -908,11 +910,11 @@ public class FirewallManagerImpl extends ManagerBase 
implements FirewallService,
         FirewallRule fwRule = _firewallDao.findByRelatedId(ruleId);
 
         if (fwRule == null) {
-            logger.trace("No related firewall rule exists for rule id=" + 
ruleId + " so returning true here");
+            s_logger.trace("No related firewall rule exists for rule id=" + 
ruleId + " so returning true here");
             return true;
         }
 
-        logger.debug("Revoking Firewall rule id=" + fwRule.getId() + " as a 
part of rule delete id=" + ruleId + " with apply=" + apply);
+        s_logger.debug("Revoking Firewall rule id=" + fwRule.getId() + " as a 
part of rule delete id=" + ruleId + " with apply=" + apply);
         return revokeIngressFirewallRule(fwRule.getId(), apply);
 
     }
@@ -948,10 +950,10 @@ public class FirewallManagerImpl extends ManagerBase 
implements FirewallService,
         Set<Long> ipsToReprogram = new HashSet<Long>();
 
         if (firewallRules.isEmpty()) {
-            logger.debug("No firewall rules are found for vm id=" + vmId);
+            s_logger.debug("No firewall rules are found for vm id=" + vmId);
             return true;
         } else {
-            logger.debug("Found " + firewallRules.size() + " to cleanup for vm 
id=" + vmId);
+            s_logger.debug("Found " + firewallRules.size() + " to cleanup for 
vm id=" + vmId);
         }
 
         for (FirewallRuleVO rule : firewallRules) {
@@ -962,11 +964,11 @@ public class FirewallManagerImpl extends ManagerBase 
implements FirewallService,
 
         // apply rules for all ip addresses
         for (Long ipId : ipsToReprogram) {
-            logger.debug("Applying firewall rules for ip address id=" + ipId + 
" as a part of vm expunge");
+            s_logger.debug("Applying firewall rules for ip address id=" + ipId 
+ " as a part of vm expunge");
             try {
                 success = success && applyIngressFirewallRules(ipId, 
_accountMgr.getSystemAccount());
             } catch (ResourceUnavailableException ex) {
-                logger.warn("Failed to apply port forwarding rules for ip id=" 
+ ipId);
+                s_logger.warn("Failed to apply port forwarding rules for ip 
id=" + ipId);
                 success = false;
             }
         }
@@ -986,7 +988,7 @@ public class FirewallManagerImpl extends ManagerBase 
implements FirewallService,
                 createFirewallRule(ip.getId(), acct, rule.getXid(), 
rule.getSourcePortStart(), rule.getSourcePortEnd(), rule.getProtocol(), 
rule.getSourceCidrList(),
                         rule.getIcmpCode(), rule.getIcmpType(), 
rule.getRelated(), FirewallRuleType.System, rule.getNetworkId(), 
rule.getTrafficType(), true);
             } catch (Exception e) {
-                logger.debug("Failed to add system wide firewall rule, due 
to:" + e.toString());
+                s_logger.debug("Failed to add system wide firewall rule, due 
to:" + e.toString());
             }
         }
         return true;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc02940/server/src/com/cloud/network/guru/ControlNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/ControlNetworkGuru.java 
b/server/src/com/cloud/network/guru/ControlNetworkGuru.java
index 0392e99..5e80bea 100644
--- a/server/src/com/cloud/network/guru/ControlNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/ControlNetworkGuru.java
@@ -23,6 +23,7 @@ import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
+import org.apache.log4j.Logger;
 
 import com.cloud.configuration.Config;
 import com.cloud.dc.DataCenter;
@@ -54,6 +55,7 @@ import com.cloud.vm.VirtualMachineProfile;
 
 @Local(value = {NetworkGuru.class})
 public class ControlNetworkGuru extends PodBasedNetworkGuru implements 
NetworkGuru {
+    private static final Logger s_logger = 
Logger.getLogger(ControlNetworkGuru.class);
     @Inject
     DataCenterDao _dcDao;
     @Inject
@@ -84,7 +86,7 @@ public class ControlNetworkGuru extends PodBasedNetworkGuru 
implements NetworkGu
         if (offering.isSystemOnly() && 
isMyTrafficType(offering.getTrafficType())) {
             return true;
         } else {
-            logger.trace("We only care about System only Control network");
+            s_logger.trace("We only care about System only Control network");
             return false;
         }
     }
@@ -176,14 +178,14 @@ public class ControlNetworkGuru extends 
PodBasedNetworkGuru implements NetworkGu
             DataCenterVO dcVo = _dcDao.findById(dcId);
             if (dcVo.getNetworkType() != NetworkType.Basic) {
                 super.release(nic, vm, reservationId);
-                if (logger.isDebugEnabled()) {
-                    logger.debug("Released nic: " + nic);
+                if (s_logger.isDebugEnabled()) {
+                    s_logger.debug("Released nic: " + nic);
                 }
                 return true;
             } else {
                 nic.deallocate();
-                if (logger.isDebugEnabled()) {
-                    logger.debug("Released nic: " + nic);
+                if (s_logger.isDebugEnabled()) {
+                    s_logger.debug("Released nic: " + nic);
                 }
                 return true;
             }
@@ -192,8 +194,8 @@ public class ControlNetworkGuru extends PodBasedNetworkGuru 
implements NetworkGu
         _dcDao.releaseLinkLocalIpAddress(nic.getId(), reservationId);
 
         nic.deallocate();
-        if (logger.isDebugEnabled()) {
-            logger.debug("Released nic: " + nic);
+        if (s_logger.isDebugEnabled()) {
+            s_logger.debug("Released nic: " + nic);
         }
 
         return true;
@@ -231,7 +233,7 @@ public class ControlNetworkGuru extends PodBasedNetworkGuru 
implements NetworkGu
             _gateway = NetUtils.getLinkLocalGateway();
         }
 
-        logger.info("Control network setup: cidr=" + _cidr + "; gateway = " + 
_gateway);
+        s_logger.info("Control network setup: cidr=" + _cidr + "; gateway = " 
+ _gateway);
 
         return true;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc02940/server/src/com/cloud/network/guru/DirectNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/DirectNetworkGuru.java 
b/server/src/com/cloud/network/guru/DirectNetworkGuru.java
index 237d03d..9686f80 100644
--- a/server/src/com/cloud/network/guru/DirectNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/DirectNetworkGuru.java
@@ -22,6 +22,7 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 
 import 
org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
+import org.apache.log4j.Logger;
 
 import com.cloud.dc.DataCenter;
 import com.cloud.dc.DataCenter.NetworkType;
@@ -73,6 +74,7 @@ import com.cloud.vm.dao.NicSecondaryIpDao;
 
 @Local(value = {NetworkGuru.class})
 public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
+    private static final Logger s_logger = 
Logger.getLogger(DirectNetworkGuru.class);
 
     @Inject
     DataCenterDao _dcDao;
@@ -119,7 +121,7 @@ public class DirectNetworkGuru extends AdapterBase 
implements NetworkGuru {
         if (dc.getNetworkType() == NetworkType.Advanced && 
isMyTrafficType(offering.getTrafficType()) && offering.getGuestType() == 
GuestType.Shared) {
             return true;
         } else {
-            logger.trace("We only take care of Guest networks of type " + 
GuestType.Shared);
+            s_logger.trace("We only take care of Guest networks of type " + 
GuestType.Shared);
             return false;
         }
     }
@@ -251,7 +253,7 @@ public class DirectNetworkGuru extends AdapterBase 
implements NetworkGuru {
                         if (vm.getType() == VirtualMachine.Type.DomainRouter) {
                             Nic placeholderNic = 
_networkModel.getPlaceholderNicForRouter(network, null);
                             if (placeholderNic == null) {
-                                logger.debug("Saving placeholder nic with ip4 
address " + nic.getIPv4Address() + " and ipv6 address " + nic.getIPv6Address() +
+                                s_logger.debug("Saving placeholder nic with 
ip4 address " + nic.getIPv4Address() + " and ipv6 address " + 
nic.getIPv6Address() +
                                         " for the network " + network);
                                 _networkMgr.savePlaceholderNic(network, 
nic.getIPv4Address(), nic.getIPv6Address(), VirtualMachine.Type.DomainRouter);
                             }
@@ -280,8 +282,8 @@ public class DirectNetworkGuru extends AdapterBase 
implements NetworkGuru {
     @Override
     @DB
     public void deallocate(final Network network, final NicProfile nic, 
VirtualMachineProfile vm) {
-        if (logger.isDebugEnabled()) {
-            logger.debug("Deallocate network: networkId: " + 
nic.getNetworkId() + ", ip: " + nic.getIPv4Address());
+        if (s_logger.isDebugEnabled()) {
+            s_logger.debug("Deallocate network: networkId: " + 
nic.getNetworkId() + ", ip: " + nic.getIPv4Address());
         }
 
         if (nic.getIPv4Address() != null) {
@@ -293,14 +295,14 @@ public class DirectNetworkGuru extends AdapterBase 
implements NetworkGuru {
                         // if the ip address a part of placeholder, don't 
release it
                         Nic placeholderNic = 
_networkModel.getPlaceholderNicForRouter(network, null);
                         if (placeholderNic != null && 
placeholderNic.getIPv4Address().equalsIgnoreCase(ip.getAddress().addr())) {
-                            logger.debug("Not releasing direct ip " + 
ip.getId() + " yet as its ip is saved in the placeholder");
+                            s_logger.debug("Not releasing direct ip " + 
ip.getId() + " yet as its ip is saved in the placeholder");
                         } else {
                             _ipAddrMgr.markIpAsUnavailable(ip.getId());
                             _ipAddressDao.unassignIpAddress(ip.getId());
                         }
 
                         //unassign nic secondary ip address
-                        logger.debug("remove nic " + nic.getId() + " secondary 
ip ");
+                        s_logger.debug("remove nic " + nic.getId() + " 
secondary ip ");
                         List<String> nicSecIps = null;
                         nicSecIps = 
_nicSecondaryIpDao.getSecondaryIpAddressesForNic(nic.getId());
                         for (String secIp : nicSecIps) {
@@ -336,12 +338,12 @@ public class DirectNetworkGuru extends AdapterBase 
implements NetworkGuru {
                     public void doInTransactionWithoutResult(TransactionStatus 
status) {
                         for (Nic nic : nics) {
                             if (nic.getIPv4Address() != null) {
-                                logger.debug("Releasing ip " + 
nic.getIPv4Address() + " of placeholder nic " + nic);
+                                s_logger.debug("Releasing ip " + 
nic.getIPv4Address() + " of placeholder nic " + nic);
                                 IPAddressVO ip = 
_ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), 
nic.getIPv4Address());
                                 if (ip != null) {
                                     _ipAddrMgr.markIpAsUnavailable(ip.getId());
                                     
_ipAddressDao.unassignIpAddress(ip.getId());
-                                    logger.debug("Removing placeholder nic " + 
nic);
+                                    s_logger.debug("Removing placeholder nic " 
+ nic);
                                     _nicDao.remove(nic.getId());
                                 }
                             }
@@ -351,7 +353,7 @@ public class DirectNetworkGuru extends AdapterBase 
implements NetworkGuru {
             }
             return true;
         }catch (Exception e) {
-            logger.error("trash. Exception:" + e.getMessage());
+            s_logger.error("trash. Exception:" + e.getMessage());
             throw new CloudRuntimeException("trash. Exception:" + 
e.getMessage(),e);
         }
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc02940/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java 
b/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java
index 71f7374..26c8015 100644
--- a/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java
@@ -22,6 +22,7 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 
 import 
org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
+import org.apache.log4j.Logger;
 
 import com.cloud.configuration.ZoneConfig;
 import com.cloud.dc.DataCenter;
@@ -63,6 +64,7 @@ import com.cloud.vm.VirtualMachineProfile;
 
 @Local(value = NetworkGuru.class)
 public class DirectPodBasedNetworkGuru extends DirectNetworkGuru {
+    private static final Logger s_logger = 
Logger.getLogger(DirectPodBasedNetworkGuru.class);
 
     @Inject
     DataCenterDao _dcDao;
@@ -85,7 +87,7 @@ public class DirectPodBasedNetworkGuru extends 
DirectNetworkGuru {
         if (dc.getNetworkType() == NetworkType.Basic && 
isMyTrafficType(offering.getTrafficType())) {
             return true;
         } else {
-            logger.trace("We only take care of Guest Direct Pod based 
networks");
+            s_logger.trace("We only take care of Guest Direct Pod based 
networks");
             return false;
         }
     }
@@ -182,7 +184,7 @@ public class DirectPodBasedNetworkGuru extends 
DirectNetworkGuru {
                         if (placeholderNic != null) {
                             IPAddressVO userIp = 
_ipAddressDao.findByIpAndSourceNetworkId(network.getId(), 
placeholderNic.getIPv4Address());
                             ip = PublicIp.createFromAddrAndVlan(userIp, 
_vlanDao.findById(userIp.getVlanId()));
-                            logger.debug("Nic got an ip address " + 
placeholderNic.getIPv4Address() + " stored in placeholder nic for the network " 
+ network +
+                            s_logger.debug("Nic got an ip address " + 
placeholderNic.getIPv4Address() + " stored in placeholder nic for the network " 
+ network +
                                 " and gateway " + podRangeGateway);
                         }
                     }
@@ -207,7 +209,7 @@ public class DirectPodBasedNetworkGuru extends 
DirectNetworkGuru {
                     if (vm.getType() == VirtualMachine.Type.DomainRouter) {
                         Nic placeholderNic = 
_networkModel.getPlaceholderNicForRouter(network, pod.getId());
                         if (placeholderNic == null) {
-                            logger.debug("Saving placeholder nic with ip4 
address " + nic.getIPv4Address() + " for the network " + network);
+                            s_logger.debug("Saving placeholder nic with ip4 
address " + nic.getIPv4Address() + " for the network " + network);
                             _networkMgr.savePlaceholderNic(network, 
nic.getIPv4Address(), null, VirtualMachine.Type.DomainRouter);
                         }
                     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc02940/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java 
b/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java
index f0739ca9..b1d1236 100644
--- a/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java
@@ -23,6 +23,7 @@ import javax.inject.Inject;
 
 import org.apache.cloudstack.context.CallContext;
 import 
org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
+import org.apache.log4j.Logger;
 
 import com.cloud.dc.DataCenter;
 import com.cloud.dc.DataCenter.NetworkType;
@@ -66,6 +67,7 @@ import com.cloud.vm.VirtualMachineProfile;
 
 @Local(value = NetworkGuru.class)
 public class ExternalGuestNetworkGuru extends GuestNetworkGuru {
+    private static final Logger s_logger = 
Logger.getLogger(ExternalGuestNetworkGuru.class);
     @Inject
     NetworkOrchestrationService _networkMgr;
     @Inject
@@ -96,7 +98,7 @@ public class ExternalGuestNetworkGuru extends 
GuestNetworkGuru {
             isMyIsolationMethod(physicalNetwork) && !offering.isSystemOnly()) {
             return true;
         } else {
-            logger.trace("We only take care of Guest networks of type   " + 
GuestType.Isolated + " in zone of type " + NetworkType.Advanced);
+            s_logger.trace("We only take care of Guest networks of type   " + 
GuestType.Isolated + " in zone of type " + NetworkType.Advanced);
             return false;
         }
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc02940/server/src/com/cloud/network/guru/GuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/GuestNetworkGuru.java 
b/server/src/com/cloud/network/guru/GuestNetworkGuru.java
index 4929335..92613c4 100644
--- a/server/src/com/cloud/network/guru/GuestNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/GuestNetworkGuru.java
@@ -28,6 +28,7 @@ import 
org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationSe
 import org.apache.cloudstack.framework.config.ConfigKey;
 import org.apache.cloudstack.framework.config.Configurable;
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
+import org.apache.log4j.Logger;
 
 import com.cloud.configuration.Config;
 import com.cloud.dc.DataCenter;
@@ -83,6 +84,7 @@ import com.cloud.vm.dao.NicDao;
 
 @Local(value = NetworkGuru.class)
 public abstract class GuestNetworkGuru extends AdapterBase implements 
NetworkGuru, Configurable {
+    private static final Logger s_logger = 
Logger.getLogger(GuestNetworkGuru.class);
 
     @Inject
     protected VpcDao _vpcDao;
@@ -159,7 +161,7 @@ public abstract class GuestNetworkGuru extends AdapterBase 
implements NetworkGur
         }
         if (methods.isEmpty()) {
             // The empty isolation method is assumed to be VLAN
-            logger.debug("Empty physical isolation type for physical network " 
+ physicalNetwork.getUuid());
+            s_logger.debug("Empty physical isolation type for physical network 
" + physicalNetwork.getUuid());
             methods = new ArrayList<String>(1);
             methods.add("VLAN".toLowerCase());
         }
@@ -231,8 +233,8 @@ public abstract class GuestNetworkGuru extends AdapterBase 
implements NetworkGur
     @DB
     public void deallocate(final Network network, final NicProfile nic, final 
VirtualMachineProfile vm) {
         if (network.getSpecifyIpRanges()) {
-            if (logger.isDebugEnabled()) {
-                logger.debug("Deallocate network: networkId: " + 
nic.getNetworkId() + ", ip: " + nic.getIPv4Address());
+            if (s_logger.isDebugEnabled()) {
+                s_logger.debug("Deallocate network: networkId: " + 
nic.getNetworkId() + ", ip: " + nic.getIPv4Address());
             }
 
             final IPAddressVO ip = 
_ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), 
nic.getIPv4Address());
@@ -428,7 +430,7 @@ public abstract class GuestNetworkGuru extends AdapterBase 
implements NetworkGur
         }
 
         if ((profile.getBroadcastDomainType() == BroadcastDomainType.Vlan || 
profile.getBroadcastDomainType() == BroadcastDomainType.Vxlan) && 
!offering.getSpecifyVlan()) {
-            logger.debug("Releasing vnet for the network id=" + 
profile.getId());
+            s_logger.debug("Releasing vnet for the network id=" + 
profile.getId());
             
_dcDao.releaseVnet(BroadcastDomainType.getValue(profile.getBroadcastUri()), 
profile.getDataCenterId(), profile.getPhysicalNetworkId(), 
profile.getAccountId(),
                     profile.getReservationId());
             
ActionEventUtils.onCompletedActionEvent(CallContext.current().getCallingUserId(),
 profile.getAccountId(), EventVO.LEVEL_INFO, EventTypes.EVENT_ZONE_VLAN_RELEASE,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc02940/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java 
b/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java
index 249cea5..2470ea7 100644
--- a/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java
@@ -21,6 +21,7 @@ import java.util.Random;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
+import org.apache.log4j.Logger;
 
 import com.cloud.dc.Pod;
 import com.cloud.dc.dao.DataCenterDao;
@@ -49,6 +50,7 @@ import com.cloud.vm.VirtualMachineProfile;
 
 @Local(value = {NetworkGuru.class})
 public class PodBasedNetworkGuru extends AdapterBase implements NetworkGuru {
+    private static final Logger s_logger = 
Logger.getLogger(PodBasedNetworkGuru.class);
     @Inject
     DataCenterDao _dcDao;
     @Inject
@@ -132,7 +134,7 @@ public class PodBasedNetworkGuru extends AdapterBase 
implements NetworkGuru {
         nic.setBroadcastUri(null);
         nic.setIsolationUri(null);
 
-        logger.debug("Allocated a nic " + nic + " for " + vm);
+        s_logger.debug("Allocated a nic " + nic + " for " + vm);
     }
 
     @Override
@@ -149,8 +151,8 @@ public class PodBasedNetworkGuru extends AdapterBase 
implements NetworkGuru {
 
         nic.deallocate();
 
-        if (logger.isDebugEnabled()) {
-            logger.debug("Released nic: " + nic);
+        if (s_logger.isDebugEnabled()) {
+            s_logger.debug("Released nic: " + nic);
         }
 
         return true;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc02940/server/src/com/cloud/network/guru/PrivateNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/PrivateNetworkGuru.java 
b/server/src/com/cloud/network/guru/PrivateNetworkGuru.java
index 5aaf155..340c8b1 100644
--- a/server/src/com/cloud/network/guru/PrivateNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/PrivateNetworkGuru.java
@@ -19,6 +19,7 @@ package com.cloud.network.guru;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
+import org.apache.log4j.Logger;
 
 import com.cloud.configuration.ConfigurationManager;
 import com.cloud.dc.DataCenter;
@@ -55,6 +56,7 @@ import com.cloud.vm.VirtualMachineProfile;
 
 @Local(value = NetworkGuru.class)
 public class PrivateNetworkGuru extends AdapterBase implements NetworkGuru {
+    private static final Logger s_logger = 
Logger.getLogger(PrivateNetworkGuru.class);
     @Inject
     protected ConfigurationManager _configMgr;
     @Inject
@@ -91,7 +93,7 @@ public class PrivateNetworkGuru extends AdapterBase 
implements NetworkGuru {
             offering.isSystemOnly()) {
             return true;
         } else {
-            logger.trace("We only take care of system Guest networks of type   
" + GuestType.Isolated + " in zone of type " + NetworkType.Advanced);
+            s_logger.trace("We only take care of system Guest networks of type 
  " + GuestType.Isolated + " in zone of type " + NetworkType.Advanced);
             return false;
         }
     }
@@ -138,8 +140,8 @@ public class PrivateNetworkGuru extends AdapterBase 
implements NetworkGuru {
 
     @Override
     public void deallocate(Network network, NicProfile nic, 
VirtualMachineProfile vm) {
-        if (logger.isDebugEnabled()) {
-            logger.debug("Deallocate network: networkId: " + 
nic.getNetworkId() + ", ip: " + nic.getIPv4Address());
+        if (s_logger.isDebugEnabled()) {
+            s_logger.debug("Deallocate network: networkId: " + 
nic.getNetworkId() + ", ip: " + nic.getIPv4Address());
         }
 
         PrivateIpVO ip = 
_privateIpDao.findByIpAndSourceNetworkId(nic.getNetworkId(), 
nic.getIPv4Address());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc02940/server/src/com/cloud/network/guru/PublicNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/PublicNetworkGuru.java 
b/server/src/com/cloud/network/guru/PublicNetworkGuru.java
index 219ba9a..9f855ea 100644
--- a/server/src/com/cloud/network/guru/PublicNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/PublicNetworkGuru.java
@@ -20,6 +20,7 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 
 import 
org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
+import org.apache.log4j.Logger;
 
 import com.cloud.dc.DataCenter;
 import com.cloud.dc.Vlan.VlanType;
@@ -59,6 +60,7 @@ import com.cloud.vm.VirtualMachineProfile;
 
 @Local(value = {NetworkGuru.class})
 public class PublicNetworkGuru extends AdapterBase implements NetworkGuru {
+    private static final Logger s_logger = 
Logger.getLogger(PublicNetworkGuru.class);
 
     @Inject
     DataCenterDao _dcDao;
@@ -195,8 +197,8 @@ public class PublicNetworkGuru extends AdapterBase 
implements NetworkGuru {
     @Override
     @DB
     public void deallocate(Network network, NicProfile nic, 
VirtualMachineProfile vm) {
-        if (logger.isDebugEnabled()) {
-            logger.debug("public network deallocate network: networkId: " + 
nic.getNetworkId() + ", ip: " + nic.getIPv4Address());
+        if (s_logger.isDebugEnabled()) {
+            s_logger.debug("public network deallocate network: networkId: " + 
nic.getNetworkId() + ", ip: " + nic.getIPv4Address());
         }
 
         final IPAddressVO ip = 
_ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), 
nic.getIPv4Address());
@@ -211,8 +213,8 @@ public class PublicNetworkGuru extends AdapterBase 
implements NetworkGuru {
         }
         nic.deallocate();
 
-        if (logger.isDebugEnabled()) {
-            logger.debug("Deallocated nic: " + nic);
+        if (s_logger.isDebugEnabled()) {
+            s_logger.debug("Deallocated nic: " + nic);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc02940/server/src/com/cloud/network/guru/StorageNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/StorageNetworkGuru.java 
b/server/src/com/cloud/network/guru/StorageNetworkGuru.java
index 5f34a36..bf21cd7 100644
--- a/server/src/com/cloud/network/guru/StorageNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/StorageNetworkGuru.java
@@ -19,6 +19,7 @@ package com.cloud.network.guru;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
+import org.apache.log4j.Logger;
 
 import com.cloud.dc.Pod;
 import com.cloud.dc.StorageNetworkIpAddressVO;
@@ -45,6 +46,7 @@ import com.cloud.vm.VirtualMachineProfile;
 
 @Local(value = NetworkGuru.class)
 public class StorageNetworkGuru extends PodBasedNetworkGuru implements 
NetworkGuru {
+    private static final Logger s_logger = 
Logger.getLogger(StorageNetworkGuru.class);
     @Inject
     StorageNetworkManager _sNwMgr;
     @Inject
@@ -75,7 +77,7 @@ public class StorageNetworkGuru extends PodBasedNetworkGuru 
implements NetworkGu
         if (isMyTrafficType(offering.getTrafficType()) && 
offering.isSystemOnly()) {
             return true;
         } else {
-            logger.trace("It's not storage network offering, skip it.");
+            s_logger.trace("It's not storage network offering, skip it.");
             return false;
         }
     }
@@ -142,7 +144,7 @@ public class StorageNetworkGuru extends PodBasedNetworkGuru 
implements NetworkGu
             nic.setBroadcastUri(null);
         }
         nic.setIsolationUri(null);
-        logger.debug("Allocated a storage nic " + nic + " for " + vm);
+        s_logger.debug("Allocated a storage nic " + nic + " for " + vm);
     }
 
     @Override
@@ -153,7 +155,7 @@ public class StorageNetworkGuru extends PodBasedNetworkGuru 
implements NetworkGu
         }
 
         _sNwMgr.releaseIpAddress(nic.getIPv4Address());
-        logger.debug("Release an storage ip " + nic.getIPv4Address());
+        s_logger.debug("Release an storage ip " + nic.getIPv4Address());
         nic.deallocate();
         return true;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc02940/server/src/com/cloud/network/lb/LBHealthCheckManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/lb/LBHealthCheckManagerImpl.java 
b/server/src/com/cloud/network/lb/LBHealthCheckManagerImpl.java
index 3e20859..84ac061 100644
--- a/server/src/com/cloud/network/lb/LBHealthCheckManagerImpl.java
+++ b/server/src/com/cloud/network/lb/LBHealthCheckManagerImpl.java
@@ -27,6 +27,7 @@ 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.framework.config.dao.ConfigurationDao;
@@ -43,6 +44,7 @@ import com.cloud.utils.concurrency.NamedThreadFactory;
 @Component
 @Local(value = {LBHealthCheckManager.class})
 public class LBHealthCheckManagerImpl extends ManagerBase implements 
LBHealthCheckManager, Manager {
+    private static final Logger s_logger = 
Logger.getLogger(LBHealthCheckManagerImpl.class);
 
     @Inject
     ConfigurationDao _configDao;
@@ -58,8 +60,8 @@ public class LBHealthCheckManagerImpl extends ManagerBase 
implements LBHealthChe
     @Override
     public boolean configure(String name, Map<String, Object> params) throws 
ConfigurationException {
         _configs = _configDao.getConfiguration("management-server", params);
-        if (logger.isInfoEnabled()) {
-            logger.info(format("Configuring LBHealthCheck Manager %1$s", 
name));
+        if (s_logger.isInfoEnabled()) {
+            s_logger.info(format("Configuring LBHealthCheck Manager %1$s", 
name));
         }
         this.name = name;
         _interval = 
NumbersUtil.parseLong(_configs.get(Config.LBHealthCheck.key()), 600);
@@ -69,14 +71,14 @@ public class LBHealthCheckManagerImpl extends ManagerBase 
implements LBHealthChe
 
     @Override
     public boolean start() {
-        logger.debug("LB HealthCheckmanager is getting Started");
+        s_logger.debug("LB HealthCheckmanager is getting Started");
         _executor.scheduleAtFixedRate(new UpdateLBHealthCheck(), 10, 
_interval, TimeUnit.SECONDS);
         return true;
     }
 
     @Override
     public boolean stop() {
-        logger.debug("HealthCheckmanager is getting Stopped");
+        s_logger.debug("HealthCheckmanager is getting Stopped");
         _executor.shutdown();
         return true;
     }
@@ -93,7 +95,7 @@ public class LBHealthCheckManagerImpl extends ManagerBase 
implements LBHealthChe
                 updateLBHealthCheck(Scheme.Public);
                 updateLBHealthCheck(Scheme.Internal);
             } catch (Exception e) {
-                logger.error("Exception in LB HealthCheck Update Checker", e);
+                s_logger.error("Exception in LB HealthCheck Update Checker", 
e);
             }
         }
     }
@@ -103,9 +105,9 @@ public class LBHealthCheckManagerImpl extends ManagerBase 
implements LBHealthChe
         try {
             _lbService.updateLBHealthChecks(scheme);
         } catch (ResourceUnavailableException e) {
-            logger.debug("Error while updating the LB HealtCheck ", e);
+            s_logger.debug("Error while updating the LB HealtCheck ", e);
         }
-        logger.debug("LB HealthCheck Manager is running and getting the 
updates from LB providers and updating service status");
+        s_logger.debug("LB HealthCheck Manager is running and getting the 
updates from LB providers and updating service status");
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc02940/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java 
b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
index 5ae741d..c03af2d 100644
--- a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
+++ b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
@@ -45,6 +45,7 @@ import 
org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationSe
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.lb.ApplicationLoadBalancerRuleVO;
 import org.apache.cloudstack.lb.dao.ApplicationLoadBalancerRuleDao;
+import org.apache.log4j.Logger;
 
 import com.cloud.agent.api.to.LoadBalancerTO;
 import com.cloud.configuration.ConfigurationManager;
@@ -169,6 +170,7 @@ import com.google.gson.reflect.TypeToken;
 
 @Local(value = {LoadBalancingRulesManager.class, 
LoadBalancingRulesService.class})
 public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase 
implements LoadBalancingRulesManager, LoadBalancingRulesService {
+    private static final Logger s_logger = 
Logger.getLogger(LoadBalancingRulesManagerImpl.class);
 
     @Inject
     NetworkOrchestrationService _networkMgr;
@@ -316,7 +318,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
         DataCenter zone = _entityMgr.findById(DataCenter.class, 
vmGroup.getZoneId());
         if (zone == null) {
             // This should never happen, but still a cautious check
-            logger.warn("Unable to find zone while packaging AutoScale Vm 
Group, zoneid: " + vmGroup.getZoneId());
+            s_logger.warn("Unable to find zone while packaging AutoScale Vm 
Group, zoneid: " + vmGroup.getZoneId());
             throw new InvalidParameterValueException("Unable to find zone");
         } else {
             if (zone.getNetworkType() == NetworkType.Advanced) {
@@ -362,7 +364,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
         List<LoadBalancingRule> rules = Arrays.asList(rule);
 
         if (!applyLbRules(rules, false)) {
-            logger.debug("LB rules' autoscale config are not completely 
applied");
+            s_logger.debug("LB rules' autoscale config are not completely 
applied");
             return false;
         }
 
@@ -401,16 +403,16 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
         try {
             success = applyAutoScaleConfig(loadBalancer, vmGroup, 
currentState);
         } catch (ResourceUnavailableException e) {
-            logger.warn("Unable to configure AutoScaleVmGroup to the lb rule: 
" + loadBalancer.getId() + " because resource is unavaliable:", e);
+            s_logger.warn("Unable to configure AutoScaleVmGroup to the lb 
rule: " + loadBalancer.getId() + " because resource is unavaliable:", e);
             if (isRollBackAllowedForProvider(loadBalancer)) {
                 loadBalancer.setState(backupState);
                 _lbDao.persist(loadBalancer);
-                logger.debug("LB Rollback rule id: " + loadBalancer.getId() + 
" lb state rolback while creating AutoscaleVmGroup");
+                s_logger.debug("LB Rollback rule id: " + loadBalancer.getId() 
+ " lb state rolback while creating AutoscaleVmGroup");
             }
             throw e;
         } finally {
             if (!success) {
-                logger.warn("Failed to configure LB Auto Scale Vm Group with 
Id:" + vmGroupid);
+                s_logger.warn("Failed to configure LB Auto Scale Vm Group with 
Id:" + vmGroupid);
             }
         }
 
@@ -420,15 +422,15 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
                     @Override
                     public void doInTransactionWithoutResult(TransactionStatus 
status) {
                         loadBalancer.setState(FirewallRule.State.Active);
-                        logger.debug("LB rule " + loadBalancer.getId() + " 
state is set to Active");
+                        s_logger.debug("LB rule " + loadBalancer.getId() + " 
state is set to Active");
                         _lbDao.persist(loadBalancer);
                         vmGroup.setState(AutoScaleVmGroup.State_Enabled);
                         _autoScaleVmGroupDao.persist(vmGroup);
-                        logger.debug("LB Auto Scale Vm Group with Id: " + 
vmGroupid + " is set to Enabled state.");
+                        s_logger.debug("LB Auto Scale Vm Group with Id: " + 
vmGroupid + " is set to Enabled state.");
                     }
                 });
             }
-            logger.info("Successfully configured LB Autoscale Vm Group with 
Id: " + vmGroupid);
+            s_logger.info("Successfully configured LB Autoscale Vm Group with 
Id: " + vmGroupid);
         }
         return success;
     }
@@ -635,7 +637,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
         Network network = _networkDao.findById(lbRule.getNetworkId());
         Purpose purpose = lbRule.getPurpose();
         if (purpose != Purpose.LoadBalancing) {
-            logger.debug("Unable to validate network rules for purpose: " + 
purpose.toString());
+            s_logger.debug("Unable to validate network rules for purpose: " + 
purpose.toString());
             return false;
         }
         for (LoadBalancingServiceProvider ne : _lbProviders) {
@@ -673,12 +675,12 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
         try {
             applyLoadBalancerConfig(cmd.getLbRuleId());
         } catch (ResourceUnavailableException e) {
-            logger.warn("Unable to apply Stickiness policy to the lb rule: " + 
cmd.getLbRuleId() + " because resource is unavaliable:", e);
+            s_logger.warn("Unable to apply Stickiness policy to the lb rule: " 
+ cmd.getLbRuleId() + " because resource is unavaliable:", e);
             if (isRollBackAllowedForProvider(loadBalancer)) {
                 loadBalancer.setState(backupState);
                 _lbDao.persist(loadBalancer);
                 deleteLBStickinessPolicy(cmd.getEntityId(), false);
-                logger.debug("LB Rollback rule id: " + loadBalancer.getId() + 
" lb state rolback while creating sticky policy");
+                s_logger.debug("LB Rollback rule id: " + loadBalancer.getId() 
+ " lb state rolback while creating sticky policy");
             } else {
                 deleteLBStickinessPolicy(cmd.getEntityId(), false);
                 if (oldStickinessPolicyId != 0) {
@@ -689,7 +691,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
                         if (backupState.equals(FirewallRule.State.Active))
                             applyLoadBalancerConfig(cmd.getLbRuleId());
                     } catch (ResourceUnavailableException e1) {
-                        logger.info("[ignored] applying load balancer 
config.", e1);
+                        s_logger.info("[ignored] applying load balancer 
config.", e1);
                     } finally {
                         loadBalancer.setState(backupState);
                         _lbDao.persist(loadBalancer);
@@ -718,11 +720,11 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
         try {
             applyLoadBalancerConfig(cmd.getLbRuleId());
         } catch (ResourceUnavailableException e) {
-            logger.warn("Unable to apply healthcheck policy to the lb rule: " 
+ cmd.getLbRuleId() + " because resource is unavaliable:", e);
+            s_logger.warn("Unable to apply healthcheck policy to the lb rule: 
" + cmd.getLbRuleId() + " because resource is unavaliable:", e);
             if (isRollBackAllowedForProvider(loadBalancer)) {
                 loadBalancer.setState(backupState);
                 _lbDao.persist(loadBalancer);
-                logger.debug("LB Rollback rule id: " + loadBalancer.getId() + 
" lb state rolback while creating healthcheck policy");
+                s_logger.debug("LB Rollback rule id: " + loadBalancer.getId() 
+ " lb state rolback while creating healthcheck policy");
             }
             deleteLBHealthCheckPolicy(cmd.getEntityId(), false);
             success = false;
@@ -758,11 +760,11 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
             boolean backupStickyState = stickinessPolicy.isRevoke();
             stickinessPolicy.setRevoke(true);
             _lb2stickinesspoliciesDao.persist(stickinessPolicy);
-            logger.debug("Set load balancer rule for revoke: rule id " + 
loadBalancerId + ", stickinesspolicyID " + stickinessPolicyId);
+            s_logger.debug("Set load balancer rule for revoke: rule id " + 
loadBalancerId + ", stickinesspolicyID " + stickinessPolicyId);
 
             try {
                 if (!applyLoadBalancerConfig(loadBalancerId)) {
-                    logger.warn("Failed to remove load balancer rule id " + 
loadBalancerId + " for stickinesspolicyID " + stickinessPolicyId);
+                    s_logger.warn("Failed to remove load balancer rule id " + 
loadBalancerId + " for stickinesspolicyID " + stickinessPolicyId);
                     throw new CloudRuntimeException("Failed to remove load 
balancer rule id " + loadBalancerId + " for stickinesspolicyID " + 
stickinessPolicyId);
                 }
             } catch (ResourceUnavailableException e) {
@@ -771,9 +773,9 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
                     _lb2stickinesspoliciesDao.persist(stickinessPolicy);
                     loadBalancer.setState(backupState);
                     _lbDao.persist(loadBalancer);
-                    logger.debug("LB Rollback rule id: " + 
loadBalancer.getId() + "  while deleting sticky policy: " + stickinessPolicyId);
+                    s_logger.debug("LB Rollback rule id: " + 
loadBalancer.getId() + "  while deleting sticky policy: " + stickinessPolicyId);
                 }
-                logger.warn("Unable to apply the load balancer config because 
resource is unavaliable.", e);
+                s_logger.warn("Unable to apply the load balancer config 
because resource is unavaliable.", e);
                 success = false;
             }
         } else {
@@ -811,7 +813,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
             boolean backupStickyState = healthCheckPolicy.isRevoke();
             healthCheckPolicy.setRevoke(true);
             _lb2healthcheckDao.persist(healthCheckPolicy);
-            logger.debug("Set health check policy to revoke for loadbalancing 
rule id : " + loadBalancerId + ", healthCheckpolicyID " + healthCheckPolicyId);
+            s_logger.debug("Set health check policy to revoke for 
loadbalancing rule id : " + loadBalancerId + ", healthCheckpolicyID " + 
healthCheckPolicyId);
 
             // removing the state of services set by the monitor.
             final List<LoadBalancerVMMapVO> maps = 
_lb2VmMapDao.listByLoadBalancerId(loadBalancerId);
@@ -819,7 +821,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
                 Transaction.execute(new TransactionCallbackNoReturn() {
                     @Override
                     public void doInTransactionWithoutResult(TransactionStatus 
status) {
-                        logger.debug("Resetting health state policy for 
services in loadbalancing rule id : " + loadBalancerId);
+                        s_logger.debug("Resetting health state policy for 
services in loadbalancing rule id : " + loadBalancerId);
                         for (LoadBalancerVMMapVO map : maps) {
                             map.setState(null);
                             _lb2VmMapDao.persist(map);
@@ -830,7 +832,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
 
             try {
                 if (!applyLoadBalancerConfig(loadBalancerId)) {
-                    logger.warn("Failed to remove load balancer rule id " + 
loadBalancerId + " for healthCheckpolicyID " + healthCheckPolicyId);
+                    s_logger.warn("Failed to remove load balancer rule id " + 
loadBalancerId + " for healthCheckpolicyID " + healthCheckPolicyId);
                     throw new CloudRuntimeException("Failed to remove load 
balancer rule id " + loadBalancerId + " for healthCheckpolicyID " + 
healthCheckPolicyId);
                 }
             } catch (ResourceUnavailableException e) {
@@ -839,9 +841,9 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
                     _lb2healthcheckDao.persist(healthCheckPolicy);
                     loadBalancer.setState(backupState);
                     _lbDao.persist(loadBalancer);
-                    logger.debug("LB Rollback rule id: " + 
loadBalancer.getId() + "  while deleting healthcheck policy: " + 
healthCheckPolicyId);
+                    s_logger.debug("LB Rollback rule id: " + 
loadBalancer.getId() + "  while deleting healthcheck policy: " + 
healthCheckPolicyId);
                 }
-                logger.warn("Unable to apply the load balancer config because 
resource is unavaliable.", e);
+                s_logger.warn("Unable to apply the load balancer config 
because resource is unavaliable.", e);
                 success = false;
             }
         } else {
@@ -865,7 +867,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
 
             if (capability != null && capability.equalsIgnoreCase("true")) {
                 /*
-                 * logger.debug(
+                 * s_logger.debug(
                  * "HealthCheck Manager :: LB Provider in the Network has the 
Healthcheck policy capability :: "
                  * + provider.get(0).getName());
                  */
@@ -901,7 +903,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
                                             if 
(dstIp.equalsIgnoreCase(lbto.getDestinations()[i].getDestIp())) {
                                                 
lbVmMap.setState(des.getMonitorState());
                                                 _lb2VmMapDao.persist(lbVmMap);
-                                                logger.debug("Updating the LB 
VM Map table with the service state");
+                                                s_logger.debug("Updating the 
LB VM Map table with the service state");
                                             }
                                         }
                                     }
@@ -915,7 +917,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
                     }
                 }
             } else {
-                // logger.debug("HealthCheck Manager :: LB Provider in the 
Network DNOT the Healthcheck policy capability ");
+                // s_logger.debug("HealthCheck Manager :: LB Provider in the 
Network DNOT the Healthcheck policy capability ");
             }
         }
     }
@@ -1077,8 +1079,8 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
 
             vmIdIpMap.put(instanceId, vmIpsList);
 
-            if (logger.isDebugEnabled()) {
-                logger.debug("Adding " + vm + " to the load balancer pool");
+            if (s_logger.isDebugEnabled()) {
+                s_logger.debug("Adding " + vm + " to the load balancer pool");
             }
             vmsToAdd.add(vm);
         }
@@ -1114,7 +1116,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
             applyLoadBalancerConfig(loadBalancerId);
             success = true;
         } catch (ResourceUnavailableException e) {
-            logger.warn("Unable to apply the load balancer config because 
resource is unavaliable.", e);
+            s_logger.warn("Unable to apply the load balancer config because 
resource is unavaliable.", e);
             success = false;
         } finally {
             if (!success) {
@@ -1129,7 +1131,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
                 });
                 if (!vmInstanceIds.isEmpty()) {
                     _lb2VmMapDao.remove(loadBalancer.getId(), vmInstanceIds, 
null);
-                    logger.debug("LB Rollback rule id: " + 
loadBalancer.getId() + "  while attaching VM: " + vmInstanceIds);
+                    s_logger.debug("LB Rollback rule id: " + 
loadBalancer.getId() + "  while attaching VM: " + vmInstanceIds);
                 }
                 loadBalancer.setState(backupState);
                 _lbDao.persist(loadBalancer);
@@ -1148,7 +1150,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
 
     @Override
     public boolean assignSSLCertToLoadBalancerRule(Long lbId, String certName, 
String publicCert, String privateKey) {
-        logger.error("Calling the manager for LB");
+        s_logger.error("Calling the manager for LB");
         LoadBalancerVO loadBalancer = _lbDao.findById(lbId);
 
         return false;  //TODO
@@ -1169,7 +1171,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
 
         SslCertVO certVO = _entityMgr.findById(SslCertVO.class, 
lbCertMap.getCertId());
         if (certVO == null) {
-            logger.warn("Cert rule with cert ID " + lbCertMap.getCertId() + " 
but Cert is not found");
+            s_logger.warn("Cert rule with cert ID " + lbCertMap.getCertId() + 
" but Cert is not found");
             return null;
         }
 
@@ -1231,9 +1233,9 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
                 _lbDao.persist(loadBalancer);
                 LoadBalancerCertMapVO certMap = 
_lbCertMapDao.findByLbRuleId(lbRuleId);
                 _lbCertMapDao.remove(certMap.getId());
-                logger.debug("LB Rollback rule id: " + loadBalancer.getId() + 
" while adding cert");
+                s_logger.debug("LB Rollback rule id: " + loadBalancer.getId() 
+ " while adding cert");
             }
-            logger.warn("Unable to apply the load balancer config because 
resource is unavaliable.", e);
+            s_logger.warn("Unable to apply the load balancer config because 
resource is unavaliable.", e);
         }
         return success;
     }
@@ -1267,7 +1269,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
             _lbCertMapDao.persist(lbCertMap);
 
             if (!applyLoadBalancerConfig(lbRuleId)) {
-                logger.warn("Failed to remove cert from load balancer rule id 
" + lbRuleId);
+                s_logger.warn("Failed to remove cert from load balancer rule 
id " + lbRuleId);
                 CloudRuntimeException ex = new CloudRuntimeException("Failed 
to remove certificate load balancer rule id " + lbRuleId);
                 ex.addProxyObject(loadBalancer.getUuid(), "loadBalancerId");
                 throw ex;
@@ -1279,9 +1281,9 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
                 _lbCertMapDao.persist(lbCertMap);
                 loadBalancer.setState(backupState);
                 _lbDao.persist(loadBalancer);
-                logger.debug("Rolled back certificate removal lb id " + 
lbRuleId);
+                s_logger.debug("Rolled back certificate removal lb id " + 
lbRuleId);
             }
-            logger.warn("Unable to apply the load balancer config because 
resource is unavaliable.", e);
+            s_logger.warn("Unable to apply the load balancer config because 
resource is unavaliable.", e);
             if (!success) {
                 CloudRuntimeException ex = new CloudRuntimeException("Failed 
to remove certificate from load balancer rule id " + lbRuleId);
                 ex.addProxyObject(loadBalancer.getUuid(), "loadBalancerId");
@@ -1345,7 +1347,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
                         lbvm.setRevoke(true);
                         _lb2VmMapDao.persist(lbvm);
                     }
-                    logger.debug("Set load balancer rule for revoke: rule id " 
+ loadBalancerId + ", vmId " + instanceId);
+                    s_logger.debug("Set load balancer rule for revoke: rule id 
" + loadBalancerId + ", vmId " + instanceId);
 
                 } else {
                     for (String vmIp: lbVmIps) {
@@ -1356,7 +1358,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
                         }
                         map.setRevoke(true);
                         _lb2VmMapDao.persist(map);
-                        logger.debug("Set load balancer rule for revoke: rule 
id " + loadBalancerId + ", vmId " +
+                        s_logger.debug("Set load balancer rule for revoke: 
rule id " + loadBalancerId + ", vmId " +
                                 instanceId + ", vmip " + vmIp);
                     }
                 }
@@ -1372,7 +1374,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
             }
 
             if (!applyLoadBalancerConfig(loadBalancerId)) {
-                logger.warn("Failed to remove load balancer rule id " + 
loadBalancerId + " for vms " + instanceIds);
+                s_logger.warn("Failed to remove load balancer rule id " + 
loadBalancerId + " for vms " + instanceIds);
                 CloudRuntimeException ex = new CloudRuntimeException("Failed 
to remove specified load balancer rule id for vms " + instanceIds);
                 ex.addProxyObject(loadBalancer.getUuid(), "loadBalancerId");
                 throw ex;
@@ -1388,13 +1390,13 @@ public class LoadBalancingRulesManagerImpl<Type> 
extends ManagerBase implements
                         LoadBalancerVMMapVO map = 
_lb2VmMapDao.findByLoadBalancerIdAndVmId(loadBalancerId, instanceId);
                         map.setRevoke(false);
                         _lb2VmMapDao.persist(map);
-                        logger.debug("LB Rollback rule id: " + loadBalancerId 
+ ",while removing vmId " + instanceId);
+                        s_logger.debug("LB Rollback rule id: " + 
loadBalancerId + ",while removing vmId " + instanceId);
                     }else {
                         for (String vmIp: lbVmIps) {
                             LoadBalancerVMMapVO map = 
_lb2VmMapDao.findByLoadBalancerIdAndVmIdVmIp (loadBalancerId, instanceId, vmIp);
                             map.setRevoke(true);
                             _lb2VmMapDao.persist(map);
-                            logger.debug("LB Rollback rule id: " + 
loadBalancerId + ",while removing vmId " +
+                            s_logger.debug("LB Rollback rule id: " + 
loadBalancerId + ",while removing vmId " +
                                     instanceId + ", vmip " + vmIp);
                         }
                     }
@@ -1402,9 +1404,9 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
 
                 loadBalancer.setState(backupState);
                 _lbDao.persist(loadBalancer);
-                logger.debug("LB Rollback rule id: " + loadBalancerId + " 
while removing vm instances");
+                s_logger.debug("LB Rollback rule id: " + loadBalancerId + " 
while removing vm instances");
             }
-            logger.warn("Unable to apply the load balancer config because 
resource is unavaliable.", e);
+            s_logger.warn("Unable to apply the load balancer config because 
resource is unavaliable.", e);
         }
         if (!success) {
             CloudRuntimeException ex = new CloudRuntimeException("Failed to 
remove specified load balancer rule id for vms " + vmIds);
@@ -1436,7 +1438,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
 
             map.setRevoke(true);
             _lb2VmMapDao.persist(map);
-            logger.debug("Set load balancer rule for revoke: rule id " + 
map.getLoadBalancerId() + ", vmId " + instanceId);
+            s_logger.debug("Set load balancer rule for revoke: rule id " + 
map.getLoadBalancerId() + ", vmId " + instanceId);
         }
 
         // Reapply all lbs that had the vm assigned
@@ -1490,8 +1492,8 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
                 boolean generateUsageEvent = false;
 
                 if (lb.getState() == FirewallRule.State.Staged) {
-                    if (logger.isDebugEnabled()) {
-                        logger.debug("Found a rule that is still in stage 
state so just removing it: " + lb);
+                    if (s_logger.isDebugEnabled()) {
+                        s_logger.debug("Found a rule that is still in stage 
state so just removing it: " + lb);
                     }
                     generateUsageEvent = true;
                 } else if (lb.getState() == FirewallRule.State.Add || 
lb.getState() == FirewallRule.State.Active) {
@@ -1505,7 +1507,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
                     for (LoadBalancerVMMapVO map : maps) {
                         map.setRevoke(true);
                         _lb2VmMapDao.persist(map);
-                        logger.debug("Set load balancer rule for revoke: rule 
id " + loadBalancerId + ", vmId " + map.getInstanceId());
+                        s_logger.debug("Set load balancer rule for revoke: 
rule id " + loadBalancerId + ", vmId " + map.getInstanceId());
                     }
                 }
 
@@ -1537,7 +1539,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
         if (apply) {
             try {
                 if (!applyLoadBalancerConfig(loadBalancerId)) {
-                    logger.warn("Unable to apply the load balancer config");
+                    s_logger.warn("Unable to apply the load balancer config");
                     return false;
                 }
             } catch (ResourceUnavailableException e) {
@@ -1545,14 +1547,14 @@ public class LoadBalancingRulesManagerImpl<Type> 
extends ManagerBase implements
                     if (backupMaps != null) {
                         for (LoadBalancerVMMapVO map : backupMaps) {
                             _lb2VmMapDao.persist(map);
-                            logger.debug("LB Rollback rule id: " + 
loadBalancerId + ", vmId " + map.getInstanceId());
+                            s_logger.debug("LB Rollback rule id: " + 
loadBalancerId + ", vmId " + map.getInstanceId());
                         }
                     }
                     lb.setState(backupState);
                     _lbDao.persist(lb);
-                    logger.debug("LB Rollback rule id: " + loadBalancerId + " 
while deleting LB rule.");
+                    s_logger.debug("LB Rollback rule id: " + loadBalancerId + 
" while deleting LB rule.");
                 } else {
-                    logger.warn("Unable to apply the load balancer config 
because resource is unavaliable.", e);
+                    s_logger.warn("Unable to apply the load balancer config 
because resource is unavaliable.", e);
                 }
                 return false;
             }
@@ -1560,7 +1562,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
 
         FirewallRuleVO relatedRule = _firewallDao.findByRelatedId(lb.getId());
         if (relatedRule != null) {
-            logger.warn("Unable to remove firewall rule id=" + lb.getId() + " 
as it has related firewall rule id=" + relatedRule.getId() +
+            s_logger.warn("Unable to remove firewall rule id=" + lb.getId() + 
" as it has related firewall rule id=" + relatedRule.getId() +
                 "; leaving it in Revoke state");
             return false;
         } else {
@@ -1572,7 +1574,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
         // Bug CS-15411 opened to document this
         // _elbMgr.handleDeleteLoadBalancerRule(lb, callerUserId, caller);
 
-        logger.debug("Load balancer with id " + lb.getId() + " is removed 
successfully");
+        s_logger.debug("Load balancer with id " + lb.getId() + " is removed 
successfully");
 
         return true;
     }
@@ -1626,7 +1628,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
                         // set networkId just for verification purposes
                         _networkModel.checkIpForService(ipVO, Service.Lb, 
networkId);
 
-                        logger.debug("The ip is not associated with the VPC 
network id=" + networkId + " so assigning");
+                        s_logger.debug("The ip is not associated with the VPC 
network id=" + networkId + " so assigning");
                         ipVO = _ipAddrMgr.associateIPToGuestNetwork(ipAddrId, 
networkId, false);
                         performedIpAssoc = true;
                     }
@@ -1641,7 +1643,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
                 result = createPublicLoadBalancer(xId, name, description, 
srcPortStart, defPortStart, ipVO.getId(), protocol, algorithm, openFirewall, 
CallContext.current(),
                         lbProtocol, forDisplay);
             } catch (Exception ex) {
-                logger.warn("Failed to create load balancer due to ", ex);
+                s_logger.warn("Failed to create load balancer due to ", ex);
                 if (ex instanceof NetworkRuleConflictException) {
                     throw (NetworkRuleConflictException)ex;
                 }
@@ -1652,7 +1654,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
 
             } finally {
                 if (result == null && systemIp != null) {
-                    logger.debug("Releasing system IP address " + systemIp + " 
as corresponding lb rule failed to create");
+                    s_logger.debug("Releasing system IP address " + systemIp + 
" as corresponding lb rule failed to create");
                     _ipAddrMgr.handleSystemIpRelease(systemIp);
                 }
                 // release ip address if ipassoc was perfored
@@ -1763,7 +1765,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
                     if (!_firewallDao.setStateToAdd(newRule)) {
                         throw new CloudRuntimeException("Unable to update the 
state to add for " + newRule);
                     }
-                    logger.debug("Load balancer " + newRule.getId() + " for Ip 
address id=" + sourceIpId + ", public port " + srcPort + ", private port " + 
destPort +
+                    s_logger.debug("Load balancer " + newRule.getId() + " for 
Ip address id=" + sourceIpId + ", public port " + srcPort + ", private port " + 
destPort +
                         " is added successfully.");
                     CallContext.current().setEventDetails("Load balancer Id: " 
+ newRule.getId());
                     
UsageEventUtils.publishUsageEvent(EventTypes.EVENT_LOAD_BALANCER_CREATE, 
ipAddr.getAllocatedToAccountId(), ipAddr.getDataCenterId(), newRule.getId(),
@@ -1805,8 +1807,8 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
     @Override
     public boolean revokeLoadBalancersForNetwork(long networkId, Scheme 
scheme) throws ResourceUnavailableException {
         List<LoadBalancerVO> lbs = _lbDao.listByNetworkIdAndScheme(networkId, 
scheme);
-        if (logger.isDebugEnabled()) {
-            logger.debug("Revoking " + lbs.size() + " " + scheme + " load 
balancing rules for network id=" + networkId);
+        if (s_logger.isDebugEnabled()) {
+            s_logger.debug("Revoking " + lbs.size() + " " + scheme + " load 
balancing rules for network id=" + networkId);
         }
         if (lbs != null) {
             for (LoadBalancerVO lb : lbs) { // called during restart, not 
persisting state in db
@@ -1814,7 +1816,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
             }
             return applyLoadBalancerRules(lbs, false); // called during 
restart, not persisting state in db
         } else {
-            logger.info("Network id=" + networkId + " doesn't have load 
balancer rules, nothing to revoke");
+            s_logger.info("Network id=" + networkId + " doesn't have load 
balancer rules, nothing to revoke");
             return true;
         }
     }
@@ -1823,10 +1825,10 @@ public class LoadBalancingRulesManagerImpl<Type> 
extends ManagerBase implements
     public boolean applyLoadBalancersForNetwork(long networkId, Scheme scheme) 
throws ResourceUnavailableException {
         List<LoadBalancerVO> lbs = _lbDao.listByNetworkIdAndScheme(networkId, 
scheme);
         if (lbs != null) {
-            logger.debug("Applying load balancer rules of scheme " + scheme + 
" in network id=" + networkId);
+            s_logger.debug("Applying load balancer rules of scheme " + scheme 
+ " in network id=" + networkId);
             return applyLoadBalancerRules(lbs, true);
         } else {
-            logger.info("Network id=" + networkId + " doesn't have load 
balancer rules of scheme " + scheme + ", nothing to apply");
+            s_logger.info("Network id=" + networkId + " doesn't have load 
balancer rules of scheme " + scheme + ", nothing to apply");
             return true;
         }
     }
@@ -1876,7 +1878,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
         }
 
         if (!applyLbRules(rules, false)) {
-            logger.debug("LB rules are not completely applied");
+            s_logger.debug("LB rules are not completely applied");
             return false;
         }
 
@@ -1889,11 +1891,11 @@ public class LoadBalancingRulesManagerImpl<Type> 
extends ManagerBase implements
 
                         if (lb.getState() == FirewallRule.State.Revoke) {
                             removeLBRule(lb);
-                            logger.debug("LB " + lb.getId() + " is 
successfully removed");
+                            s_logger.debug("LB " + lb.getId() + " is 
successfully removed");
                             checkForReleaseElasticIp = true;
                         } else if (lb.getState() == FirewallRule.State.Add) {
                             lb.setState(FirewallRule.State.Active);
-                            logger.debug("LB rule " + lb.getId() + " state is 
set to Active");
+                            s_logger.debug("LB rule " + lb.getId() + " state 
is set to Active");
                             _lbDao.persist(lb);
                         }
 
@@ -1904,7 +1906,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
                         for (LoadBalancerVMMapVO lbVmMap : lbVmMaps) {
                             instanceIds.add(lbVmMap.getInstanceId());
                             _lb2VmMapDao.remove(lb.getId(), 
lbVmMap.getInstanceId(), lbVmMap.getInstanceIp(), null);
-                            logger.debug("Load balancer rule id " + lb.getId() 
+ " is removed for vm " +
+                            s_logger.debug("Load balancer rule id " + 
lb.getId() + " is removed for vm " +
                                     lbVmMap.getInstanceId() + " instance ip " 
+ lbVmMap.getInstanceIp());
                         }
 
@@ -1912,14 +1914,14 @@ public class LoadBalancingRulesManagerImpl<Type> 
extends ManagerBase implements
                         if 
(_lb2VmMapDao.listByLoadBalancerId(lb.getId()).isEmpty()) {
                             lb.setState(FirewallRule.State.Add);
                             _lbDao.persist(lb);
-                            logger.debug("LB rule " + lb.getId() + " state is 
set to Add as there are no more active LB-VM mappings");
+                            s_logger.debug("LB rule " + lb.getId() + " state 
is set to Add as there are no more active LB-VM mappings");
                         }
 
                         // remove LB-Stickiness policy mapping that were state 
to revoke
                         List<LBStickinessPolicyVO> stickinesspolicies = 
_lb2stickinesspoliciesDao.listByLoadBalancerId(lb.getId(), true);
                         if (!stickinesspolicies.isEmpty()) {
                             _lb2stickinesspoliciesDao.remove(lb.getId(), true);
-                            logger.debug("Load balancer rule id " + lb.getId() 
+ " is removed stickiness policies");
+                            s_logger.debug("Load balancer rule id " + 
lb.getId() + " is removed stickiness policies");
                         }
 
                         // remove LB-HealthCheck policy mapping that were 
state to
@@ -1927,13 +1929,13 @@ public class LoadBalancingRulesManagerImpl<Type> 
extends ManagerBase implements
                         List<LBHealthCheckPolicyVO> healthCheckpolicies = 
_lb2healthcheckDao.listByLoadBalancerId(lb.getId(), true);
                         if (!healthCheckpolicies.isEmpty()) {
                             _lb2healthcheckDao.remove(lb.getId(), true);
-                            logger.debug("Load balancer rule id " + lb.getId() 
+ " is removed health check monitors policies");
+                            s_logger.debug("Load balancer rule id " + 
lb.getId() + " is removed health check monitors policies");
                         }
 
                         LoadBalancerCertMapVO lbCertMap = 
_lbCertMapDao.findByLbRuleId(lb.getId());
                         if (lbCertMap != null && lbCertMap.isRevoke()) {
                             _lbCertMapDao.remove(lbCertMap.getId());
-                            logger.debug("Load balancer rule id " + lb.getId() 
+ " removed certificate mapping");
+                            s_logger.debug("Load balancer rule id " + 
lb.getId() + " removed certificate mapping");
                         }
 
                         return checkForReleaseElasticIp;
@@ -1947,11 +1949,11 @@ public class LoadBalancingRulesManagerImpl<Type> 
extends ManagerBase implements
                         try {
                             success = handleSystemLBIpRelease(lb);
                         } catch (Exception ex) {
-                            logger.warn("Failed to release system ip as a part 
of lb rule " + lb + " deletion due to exception ", ex);
+                            s_logger.warn("Failed to release system ip as a 
part of lb rule " + lb + " deletion due to exception ", ex);
                             success = false;
                         } finally {
                             if (!success) {
-                                logger.warn("Failed to release system ip as a 
part of lb rule " + lb + " deletion");
+                                s_logger.warn("Failed to release system ip as 
a part of lb rule " + lb + " deletion");
                             }
                         }
                     }
@@ -1972,12 +1974,12 @@ public class LoadBalancingRulesManagerImpl<Type> 
extends ManagerBase implements
         IpAddress ip = _ipAddressDao.findById(lb.getSourceIpAddressId());
         boolean success = true;
         if (ip.getSystem()) {
-            logger.debug("Releasing system ip address " + 
lb.getSourceIpAddressId() + " as a part of delete lb rule");
+            s_logger.debug("Releasing system ip address " + 
lb.getSourceIpAddressId() + " as a part of delete lb rule");
             if 
(!_ipAddrMgr.disassociatePublicIpAddress(lb.getSourceIpAddressId(), 
CallContext.current().getCallingUserId(), 
CallContext.current().getCallingAccount())) {
-                logger.warn("Unable to release system ip address id=" + 
lb.getSourceIpAddressId() + " as a part of delete lb rule");
+                s_logger.warn("Unable to release system ip address id=" + 
lb.getSourceIpAddressId() + " as a part of delete lb rule");
                 success = false;
             } else {
-                logger.warn("Successfully released system ip address id=" + 
lb.getSourceIpAddressId() + " as a part of delete lb rule");
+                s_logger.warn("Successfully released system ip address id=" + 
lb.getSourceIpAddressId() + " as a part of delete lb rule");
             }
         }
         return success;
@@ -1987,11 +1989,11 @@ public class LoadBalancingRulesManagerImpl<Type> 
extends ManagerBase implements
     public boolean removeAllLoadBalanacersForIp(long ipId, Account caller, 
long callerUserId) {
         List<FirewallRuleVO> rules = 
_firewallDao.listByIpAndPurposeAndNotRevoked(ipId, Purpose.LoadBalancing);
         if (rules != null) {
-            logger.debug("Found " + rules.size() + " lb rules to cleanup");
+            s_logger.debug("Found " + rules.size() + " lb rules to cleanup");
             for (FirewallRule rule : rules) {
                 boolean result = deleteLoadBalancerRule(rule.getId(), true, 
caller, callerUserId, false);
                 if (result == false) {
-                    logger.warn("Unable to remove load balancer rule " + 
rule.getId());
+                    s_logger.warn("Unable to remove load balancer rule " + 
rule.getId());
                     return false;
                 }
             }
@@ -2003,11 +2005,11 @@ public class LoadBalancingRulesManagerImpl<Type> 
extends ManagerBase implements
     public boolean removeAllLoadBalanacersForNetwork(long networkId, Account 
caller, long callerUserId) {
         List<FirewallRuleVO> rules = 
_firewallDao.listByNetworkAndPurposeAndNotRevoked(networkId, 
Purpose.LoadBalancing);
         if (rules != null) {
-            logger.debug("Found " + rules.size() + " lb rules to cleanup");
+            s_logger.debug("Found " + rules.size() + " lb rules to cleanup");
             for (FirewallRule rule : rules) {
                 boolean result = deleteLoadBalancerRule(rule.getId(), true, 
caller, callerUserId, false);
                 if (result == false) {
-                    logger.warn("Unable to remove load balancer rule " + 
rule.getId());
+                    s_logger.warn("Unable to remove load balancer rule " + 
rule.getId());
                     return false;
                 }
             }
@@ -2133,9 +2135,9 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
                     _lbDao.update(lb.getId(), lb);
                     _lbDao.persist(lb);
 
-                    logger.debug("LB Rollback rule id: " + lbRuleId + " while 
updating LB rule.");
+                    s_logger.debug("LB Rollback rule id: " + lbRuleId + " 
while updating LB rule.");
                 }
-                logger.warn("Unable to apply the load balancer config because 
resource is unavaliable.", e);
+                s_logger.warn("Unable to apply the load balancer config 
because resource is unavaliable.", e);
                 success = false;
             }
         }
@@ -2170,7 +2172,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
         vmLoadBalancerMappings = 
_lb2VmMapDao.listByLoadBalancerId(loadBalancerId);
         if(vmLoadBalancerMappings == null) {
             String msg = "no VM Loadbalancer Mapping found";
-            logger.error(msg);
+            s_logger.error(msg);
             throw new CloudRuntimeException(msg);
         }
         Map<Long, String> vmServiceState = new HashMap<Long, 
String>(vmLoadBalancerMappings.size());
@@ -2412,7 +2414,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
 
     public boolean applyLbRules(List<LoadBalancingRule> rules, boolean 
continueOnError) throws ResourceUnavailableException {
         if (rules == null || rules.size() == 0) {
-            logger.debug("There are no Load Balancing Rules to forward to the 
network elements");
+            s_logger.debug("There are no Load Balancing Rules to forward to 
the network elements");
             return true;
         }
 
@@ -2441,7 +2443,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends 
ManagerBase implements
             if (!continueOnError) {
                 throw e;
             }
-            logger.warn("Problems with applying load balancing rules but 
pushing on", e);
+            s_logger.warn("Problems with applying load balancing rules but 
pushing on", e);
             success = false;
         }
 

Reply via email to