cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [30/36] git commit: updated refs/heads/master to cd7218e
Date Sat, 29 Aug 2015 20:06:27 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/projects/dao/ProjectDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/projects/dao/ProjectDaoImpl.java b/engine/schema/src/com/cloud/projects/dao/ProjectDaoImpl.java
index b2cf2d8..18f564f 100644
--- a/engine/schema/src/com/cloud/projects/dao/ProjectDaoImpl.java
+++ b/engine/schema/src/com/cloud/projects/dao/ProjectDaoImpl.java
@@ -21,7 +21,6 @@ import java.util.List;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.projects.Project;
@@ -39,7 +38,6 @@ import com.cloud.utils.db.TransactionLegacy;
 @Component
 @Local(value = {ProjectDao.class})
 public class ProjectDaoImpl extends GenericDaoBase<ProjectVO, Long> implements ProjectDao {
-    private static final Logger s_logger = Logger.getLogger(ProjectDaoImpl.class);
     protected final SearchBuilder<ProjectVO> AllFieldsSearch;
     protected GenericSearchBuilder<ProjectVO, Long> CountByDomain;
     protected GenericSearchBuilder<ProjectVO, Long> ProjectAccountSearch;
@@ -79,7 +77,7 @@ public class ProjectDaoImpl extends GenericDaoBase<ProjectVO, Long> implements P
         ProjectVO projectToRemove = findById(projectId);
         projectToRemove.setName(null);
         if (!update(projectId, projectToRemove)) {
-            s_logger.warn("Failed to reset name for the project id=" + projectId + " as a part of project remove");
+            logger.warn("Failed to reset name for the project id=" + projectId + " as a part of project remove");
             return false;
         }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/projects/dao/ProjectInvitationDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/projects/dao/ProjectInvitationDaoImpl.java b/engine/schema/src/com/cloud/projects/dao/ProjectInvitationDaoImpl.java
index 0dff4af..16112c4 100644
--- a/engine/schema/src/com/cloud/projects/dao/ProjectInvitationDaoImpl.java
+++ b/engine/schema/src/com/cloud/projects/dao/ProjectInvitationDaoImpl.java
@@ -21,7 +21,6 @@ import java.util.List;
 
 import javax.ejb.Local;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.projects.ProjectInvitation.State;
@@ -34,7 +33,6 @@ import com.cloud.utils.db.SearchCriteria;
 @Component
 @Local(value = {ProjectInvitationDao.class})
 public class ProjectInvitationDaoImpl extends GenericDaoBase<ProjectInvitationVO, Long> implements ProjectInvitationDao {
-    private static final Logger s_logger = Logger.getLogger(ProjectInvitationDaoImpl.class);
     protected final SearchBuilder<ProjectInvitationVO> AllFieldsSearch;
     protected final SearchBuilder<ProjectInvitationVO> InactiveSearch;
 
@@ -91,7 +89,7 @@ public class ProjectInvitationDaoImpl extends GenericDaoBase<ProjectInvitationVO
         for (ProjectInvitationVO invitationToExpire : invitationsToExpire) {
             invitationToExpire.setState(State.Expired);
             if (!update(invitationToExpire.getId(), invitationToExpire)) {
-                s_logger.warn("Fail to expire invitation " + invitationToExpire.toString());
+                logger.warn("Fail to expire invitation " + invitationToExpire.toString());
                 success = false;
             }
         }
@@ -113,7 +111,7 @@ public class ProjectInvitationDaoImpl extends GenericDaoBase<ProjectInvitationVO
         sc.setParameters("id", id);
 
         if (findOneBy(sc) == null) {
-            s_logger.warn("Unable to find project invitation by id " + id);
+            logger.warn("Unable to find project invitation by id " + id);
             return false;
         }
 
@@ -165,7 +163,7 @@ public class ProjectInvitationDaoImpl extends GenericDaoBase<ProjectInvitationVO
         sc.setParameters("projectId", projectId);
 
         int numberRemoved = remove(sc);
-        s_logger.debug("Removed " + numberRemoved + " invitations for project id=" + projectId);
+        logger.debug("Removed " + numberRemoved + " invitations for project id=" + projectId);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/storage/dao/LaunchPermissionDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/LaunchPermissionDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/LaunchPermissionDaoImpl.java
index 3a5c385..4c45723 100644
--- a/engine/schema/src/com/cloud/storage/dao/LaunchPermissionDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/LaunchPermissionDaoImpl.java
@@ -24,7 +24,6 @@ import java.util.List;
 
 import javax.ejb.Local;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.storage.LaunchPermissionVO;
@@ -41,7 +40,6 @@ import com.cloud.utils.exception.CloudRuntimeException;
 @Component
 @Local(value = {LaunchPermissionDao.class})
 public class LaunchPermissionDaoImpl extends GenericDaoBase<LaunchPermissionVO, Long> implements LaunchPermissionDao {
-    private static final Logger s_logger = Logger.getLogger(LaunchPermissionDaoImpl.class);
     private static final String REMOVE_LAUNCH_PERMISSION = "DELETE FROM `cloud`.`launch_permission`" + "  WHERE template_id = ? AND account_id = ?";
 
     private static final String LIST_PERMITTED_TEMPLATES =
@@ -82,7 +80,7 @@ public class LaunchPermissionDaoImpl extends GenericDaoBase<LaunchPermissionVO,
             txn.commit();
         } catch (Exception e) {
             txn.rollback();
-            s_logger.warn("Error removing launch permissions", e);
+            logger.warn("Error removing launch permissions", e);
             throw new CloudRuntimeException("Error removing launch permissions", e);
         }
     }
@@ -147,7 +145,7 @@ public class LaunchPermissionDaoImpl extends GenericDaoBase<LaunchPermissionVO,
                 permittedTemplates.add(template);
             }
         } catch (Exception e) {
-            s_logger.warn("Error listing permitted templates", e);
+            logger.warn("Error listing permitted templates", e);
         }
         return permittedTemplates;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/storage/dao/SnapshotDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/SnapshotDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/SnapshotDaoImpl.java
index ccca944..9296e99 100644
--- a/engine/schema/src/com/cloud/storage/dao/SnapshotDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/SnapshotDaoImpl.java
@@ -24,7 +24,6 @@ import javax.annotation.PostConstruct;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.server.ResourceTag.ResourceObjectType;
@@ -53,7 +52,6 @@ import com.cloud.vm.dao.VMInstanceDao;
 @Component
 @Local(value = {SnapshotDao.class})
 public class SnapshotDaoImpl extends GenericDaoBase<SnapshotVO, Long> implements SnapshotDao {
-    public static final Logger s_logger = Logger.getLogger(SnapshotDaoImpl.class.getName());
     // TODO: we should remove these direct sqls
     private static final String GET_LAST_SNAPSHOT =
         "SELECT snapshots.id FROM snapshot_store_ref, snapshots where snapshots.id = snapshot_store_ref.snapshot_id AND snapshosts.volume_id = ? AND snapshot_store_ref.role = ? ORDER BY created DESC";
@@ -208,7 +206,7 @@ public class SnapshotDaoImpl extends GenericDaoBase<SnapshotVO, Long> implements
                 return rs.getLong(1);
             }
         } catch (Exception ex) {
-            s_logger.info("[ignored]"
+            logger.info("[ignored]"
                     + "caught something while getting sec. host id: " + ex.getLocalizedMessage());
         }
         return null;
@@ -228,7 +226,7 @@ public class SnapshotDaoImpl extends GenericDaoBase<SnapshotVO, Long> implements
                 return rs.getLong(1);
             }
         } catch (Exception ex) {
-            s_logger.error("error getting last snapshot", ex);
+            logger.error("error getting last snapshot", ex);
         }
         return 0;
     }
@@ -246,7 +244,7 @@ public class SnapshotDaoImpl extends GenericDaoBase<SnapshotVO, Long> implements
             pstmt.executeUpdate();
             return 1;
         } catch (Exception ex) {
-            s_logger.error("error getting last snapshot", ex);
+            logger.error("error getting last snapshot", ex);
         }
         return 0;
     }
@@ -263,7 +261,7 @@ public class SnapshotDaoImpl extends GenericDaoBase<SnapshotVO, Long> implements
             pstmt.executeUpdate();
             return 1;
         } catch (Exception ex) {
-            s_logger.error("error set secondary storage host id", ex);
+            logger.error("error set secondary storage host id", ex);
         }
         return 0;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/storage/dao/StoragePoolHostDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/StoragePoolHostDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/StoragePoolHostDaoImpl.java
index c1a7657..df5a45a 100644
--- a/engine/schema/src/com/cloud/storage/dao/StoragePoolHostDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/StoragePoolHostDaoImpl.java
@@ -24,7 +24,6 @@ import java.util.List;
 
 import javax.ejb.Local;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.host.Status;
@@ -38,7 +37,6 @@ import com.cloud.utils.db.TransactionLegacy;
 @Component
 @Local(value = {StoragePoolHostDao.class})
 public class StoragePoolHostDaoImpl extends GenericDaoBase<StoragePoolHostVO, Long> implements StoragePoolHostDao {
-    public static final Logger s_logger = Logger.getLogger(StoragePoolHostDaoImpl.class.getName());
 
     protected final SearchBuilder<StoragePoolHostVO> PoolSearch;
     protected final SearchBuilder<StoragePoolHostVO> HostSearch;
@@ -115,10 +113,10 @@ public class StoragePoolHostDaoImpl extends GenericDaoBase<StoragePoolHostVO, Lo
                     result.add(findById(id));
                 }
             }catch (SQLException e) {
-                s_logger.warn("listByHostStatus:Exception: ", e);
+                logger.warn("listByHostStatus:Exception: ", e);
             }
         } catch (Exception e) {
-            s_logger.warn("listByHostStatus:Exception: ", e);
+            logger.warn("listByHostStatus:Exception: ", e);
         }
         return result;
     }
@@ -138,7 +136,7 @@ public class StoragePoolHostDaoImpl extends GenericDaoBase<StoragePoolHostVO, Lo
                 l.add(new Pair<Long, Integer>(rs.getLong(1), rs.getInt(2)));
             }
         } catch (SQLException e) {
-            s_logger.debug("SQLException: ", e);
+            logger.debug("SQLException: ", e);
         }
         return l;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/storage/dao/UploadDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/UploadDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/UploadDaoImpl.java
index 191fc4c..42f989a 100644
--- a/engine/schema/src/com/cloud/storage/dao/UploadDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/UploadDaoImpl.java
@@ -20,7 +20,6 @@ import java.util.List;
 
 import javax.ejb.Local;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.storage.Upload.Mode;
@@ -33,7 +32,6 @@ import com.cloud.utils.db.SearchCriteria;
 @Component
 @Local(value = {UploadDao.class})
 public class UploadDaoImpl extends GenericDaoBase<UploadVO, Long> implements UploadDao {
-    public static final Logger s_logger = Logger.getLogger(UploadDaoImpl.class.getName());
     protected final SearchBuilder<UploadVO> typeUploadStatusSearch;
     protected final SearchBuilder<UploadVO> typeHostAndUploadStatusSearch;
     protected final SearchBuilder<UploadVO> typeModeAndStatusSearch;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/storage/dao/VMTemplateDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/VMTemplateDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/VMTemplateDaoImpl.java
index 02fb4b4..0c21c4f 100644
--- a/engine/schema/src/com/cloud/storage/dao/VMTemplateDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/VMTemplateDaoImpl.java
@@ -30,7 +30,6 @@ import javax.naming.ConfigurationException;
 
 import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO;
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.dc.dao.DataCenterDao;
@@ -65,7 +64,6 @@ import com.cloud.utils.exception.CloudRuntimeException;
 @Component
 @Local(value = {VMTemplateDao.class})
 public class VMTemplateDaoImpl extends GenericDaoBase<VMTemplateVO, Long> implements VMTemplateDao {
-    private static final Logger s_logger = Logger.getLogger(VMTemplateDaoImpl.class);
 
     @Inject
     VMTemplateZoneDao _templateZoneDao;
@@ -234,7 +232,7 @@ public class VMTemplateDaoImpl extends GenericDaoBase<VMTemplateVO, Long> implem
                 l.add(rs.getLong(1));
             }
         } catch (SQLException e) {
-            s_logger.debug("Exception: ", e);
+            logger.debug("Exception: ", e);
         }
         return l;
     }
@@ -288,7 +286,7 @@ public class VMTemplateDaoImpl extends GenericDaoBase<VMTemplateVO, Long> implem
 
         routerTmpltName = (String)params.get("routing.uniquename");
 
-        s_logger.debug("Found parameter routing unique name " + routerTmpltName);
+        logger.debug("Found parameter routing unique name " + routerTmpltName);
         if (routerTmpltName == null) {
             routerTmpltName = "routing";
         }
@@ -297,8 +295,8 @@ public class VMTemplateDaoImpl extends GenericDaoBase<VMTemplateVO, Long> implem
         if (consoleProxyTmpltName == null) {
             consoleProxyTmpltName = "routing";
         }
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Use console proxy template : " + consoleProxyTmpltName);
+        if (logger.isDebugEnabled()) {
+            logger.debug("Use console proxy template : " + consoleProxyTmpltName);
         }
 
         UniqueNameSearch = createSearchBuilder();
@@ -512,10 +510,10 @@ public class VMTemplateDaoImpl extends GenericDaoBase<VMTemplateVO, Long> implem
      * (rs.next()) { Pair<Long, Long> templateZonePair = new Pair<Long,
      * Long>(rs.getLong(1), -1L); templateZonePairList.add(templateZonePair); }
      *
-     * } catch (Exception e) { s_logger.warn("Error listing templates", e); }
+     * } catch (Exception e) { logger.warn("Error listing templates", e); }
      * finally { try { if (rs != null) { rs.close(); } if (pstmt != null) {
      * pstmt.close(); } txn.commit(); } catch (SQLException sqle) {
-     * s_logger.warn("Error in cleaning up", sqle); } }
+     * logger.warn("Error in cleaning up", sqle); } }
      *
      * return templateZonePairList; }
      *
@@ -696,9 +694,9 @@ public class VMTemplateDaoImpl extends GenericDaoBase<VMTemplateVO, Long> implem
      * null)); continue; } else if (keyword == null && name == null){
      * templateZonePairList.add(new Pair<Long,Long>(publicIsos.get(i).getId(),
      * null)); } } } } } catch (Exception e) {
-     * s_logger.warn("Error listing templates", e); } finally { try { if (rs !=
+     * logger.warn("Error listing templates", e); } finally { try { if (rs !=
      * null) { rs.close(); } if (pstmt != null) { pstmt.close(); } txn.commit();
-     * } catch( SQLException sqle) { s_logger.warn("Error in cleaning up",
+     * } catch( SQLException sqle) { logger.warn("Error in cleaning up",
      * sqle); } }
      *
      * return templateZonePairList; }
@@ -1021,7 +1019,7 @@ public class VMTemplateDaoImpl extends GenericDaoBase<VMTemplateVO, Long> implem
      * while (rs.next()) { final Pair<Long, Long> templateZonePair = new
      * Pair<Long, Long>( rs.getLong(1), -1L);
      * templateZonePairList.add(templateZonePair); } txn.commit(); } catch
-     * (Exception e) { s_logger.warn("Error listing S3 templates", e); if (txn
+     * (Exception e) { logger.warn("Error listing S3 templates", e); if (txn
      * != null) { txn.rollback(); } } finally { closeResources(pstmt, rs); if
      * (txn != null) { txn.close(); } }
      *
@@ -1050,7 +1048,7 @@ public class VMTemplateDaoImpl extends GenericDaoBase<VMTemplateVO, Long> implem
         builder.set(vo, "updated", new Date());
 
         int rows = update((VMTemplateVO)vo, sc);
-        if (rows == 0 && s_logger.isDebugEnabled()) {
+        if (rows == 0 && logger.isDebugEnabled()) {
             VMTemplateVO dbTemplate = findByIdIncludingRemoved(vo.getId());
             if (dbTemplate != null) {
                 StringBuilder str = new StringBuilder("Unable to update ").append(vo.toString());
@@ -1083,7 +1081,7 @@ public class VMTemplateDaoImpl extends GenericDaoBase<VMTemplateVO, Long> implem
                     .append("; updatedTime=")
                     .append(oldUpdatedTime);
             } else {
-                s_logger.debug("Unable to update template: id=" + vo.getId() + ", as no such template exists in the database anymore");
+                logger.debug("Unable to update template: id=" + vo.getId() + ", as no such template exists in the database anymore");
             }
         }
         return rows > 0;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/storage/dao/VMTemplateHostDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/VMTemplateHostDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/VMTemplateHostDaoImpl.java
index a176881..862ca43 100644
--- a/engine/schema/src/com/cloud/storage/dao/VMTemplateHostDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/VMTemplateHostDaoImpl.java
@@ -29,7 +29,6 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore;
@@ -53,7 +52,6 @@ import com.cloud.utils.db.UpdateBuilder;
 @Component
 @Local(value = {VMTemplateHostDao.class})
 public class VMTemplateHostDaoImpl extends GenericDaoBase<VMTemplateHostVO, Long> implements VMTemplateHostDao {
-    public static final Logger s_logger = Logger.getLogger(VMTemplateHostDaoImpl.class.getName());
     @Inject
     HostDao _hostDao;
     protected final SearchBuilder<VMTemplateHostVO> HostSearch;
@@ -172,7 +170,7 @@ public class VMTemplateHostDaoImpl extends GenericDaoBase<VMTemplateHostVO, Long
             pstmt.setLong(8, instance.getTemplateId());
             pstmt.executeUpdate();
         } catch (Exception e) {
-            s_logger.warn("Exception: ", e);
+            logger.warn("Exception: ", e);
         }
     }
 
@@ -241,7 +239,7 @@ public class VMTemplateHostDaoImpl extends GenericDaoBase<VMTemplateHostVO, Long
                 result.add(toEntityBean(rs, false));
             }
         } catch (Exception e) {
-            s_logger.warn("Exception: ", e);
+            logger.warn("Exception: ", e);
         }
         return result;
     }
@@ -273,10 +271,10 @@ public class VMTemplateHostDaoImpl extends GenericDaoBase<VMTemplateHostVO, Long
                     result.add(findById(id));
                 }
             }catch (SQLException e) {
-                s_logger.warn("listByTemplateStatus:Exception: "+e.getMessage(), e);
+                logger.warn("listByTemplateStatus:Exception: "+e.getMessage(), e);
             }
         } catch (Exception e) {
-            s_logger.warn("listByTemplateStatus:Exception: "+e.getMessage(), e);
+            logger.warn("listByTemplateStatus:Exception: "+e.getMessage(), e);
         }
         return result;
 
@@ -391,7 +389,7 @@ public class VMTemplateHostDaoImpl extends GenericDaoBase<VMTemplateHostVO, Long
         builder.set(vo, "updated", new Date());
 
         int rows = update((VMTemplateHostVO)vo, sc);
-        if (rows == 0 && s_logger.isDebugEnabled()) {
+        if (rows == 0 && logger.isDebugEnabled()) {
             VMTemplateHostVO dbVol = findByIdIncludingRemoved(templateHost.getId());
             if (dbVol != null) {
                 StringBuilder str = new StringBuilder("Unable to update ").append(vo.toString());
@@ -424,7 +422,7 @@ public class VMTemplateHostDaoImpl extends GenericDaoBase<VMTemplateHostVO, Long
                     .append("; updatedTime=")
                     .append(oldUpdatedTime);
             } else {
-                s_logger.debug("Unable to update objectIndatastore: id=" + templateHost.getId() + ", as there is no such object exists in the database anymore");
+                logger.debug("Unable to update objectIndatastore: id=" + templateHost.getId() + ", as there is no such object exists in the database anymore");
             }
         }
         return rows > 0;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/storage/dao/VMTemplatePoolDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/VMTemplatePoolDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/VMTemplatePoolDaoImpl.java
index aacd4ff..8a4f8f1 100644
--- a/engine/schema/src/com/cloud/storage/dao/VMTemplatePoolDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/VMTemplatePoolDaoImpl.java
@@ -24,7 +24,6 @@ import java.util.List;
 
 import javax.ejb.Local;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore;
@@ -44,7 +43,6 @@ import com.cloud.utils.db.UpdateBuilder;
 @Component
 @Local(value = {VMTemplatePoolDao.class})
 public class VMTemplatePoolDaoImpl extends GenericDaoBase<VMTemplateStoragePoolVO, Long> implements VMTemplatePoolDao {
-    public static final Logger s_logger = Logger.getLogger(VMTemplatePoolDaoImpl.class.getName());
 
     protected final SearchBuilder<VMTemplateStoragePoolVO> PoolSearch;
     protected final SearchBuilder<VMTemplateStoragePoolVO> TemplateSearch;
@@ -160,7 +158,7 @@ public class VMTemplatePoolDaoImpl extends GenericDaoBase<VMTemplateStoragePoolV
                 result.add(toEntityBean(rs, false));
             }
         } catch (Exception e) {
-            s_logger.warn("Exception: ", e);
+            logger.warn("Exception: ", e);
         }
         return result;
 
@@ -184,10 +182,10 @@ public class VMTemplatePoolDaoImpl extends GenericDaoBase<VMTemplateStoragePoolV
                     result.add(findById(id));
                 }
             }catch (Exception e) {
-                s_logger.warn("Exception: ", e);
+                logger.warn("Exception: ", e);
             }
         } catch (Exception e) {
-            s_logger.warn("Exception: ", e);
+            logger.warn("Exception: ", e);
         }
         return result;
 
@@ -208,10 +206,10 @@ public class VMTemplatePoolDaoImpl extends GenericDaoBase<VMTemplateStoragePoolV
                     result.add(findById(id));
                 }
             }catch (Exception e) {
-                s_logger.warn("Exception: ", e);
+                logger.warn("Exception: ", e);
             }
         } catch (Exception e) {
-            s_logger.warn("Exception: ", e);
+            logger.warn("Exception: ", e);
         }
         return result;
 
@@ -259,7 +257,7 @@ public class VMTemplatePoolDaoImpl extends GenericDaoBase<VMTemplateStoragePoolV
         builder.set(vo, "updated", new Date());
 
         int rows = update((VMTemplateStoragePoolVO)vo, sc);
-        if (rows == 0 && s_logger.isDebugEnabled()) {
+        if (rows == 0 && logger.isDebugEnabled()) {
             VMTemplateStoragePoolVO dbVol = findByIdIncludingRemoved(templatePool.getId());
             if (dbVol != null) {
                 StringBuilder str = new StringBuilder("Unable to update ").append(vo.toString());
@@ -292,7 +290,7 @@ public class VMTemplatePoolDaoImpl extends GenericDaoBase<VMTemplateStoragePoolV
                     .append("; updatedTime=")
                     .append(oldUpdatedTime);
             } else {
-                s_logger.debug("Unable to update objectIndatastore: id=" + templatePool.getId() + ", as there is no such object exists in the database anymore");
+                logger.debug("Unable to update objectIndatastore: id=" + templatePool.getId() + ", as there is no such object exists in the database anymore");
             }
         }
         return rows > 0;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/storage/dao/VMTemplateZoneDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/VMTemplateZoneDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/VMTemplateZoneDaoImpl.java
index 8cadf61..ebd0cf5 100644
--- a/engine/schema/src/com/cloud/storage/dao/VMTemplateZoneDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/VMTemplateZoneDaoImpl.java
@@ -20,7 +20,6 @@ import java.util.List;
 
 import javax.ejb.Local;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.storage.VMTemplateZoneVO;
@@ -32,7 +31,6 @@ import com.cloud.utils.db.TransactionLegacy;
 @Component
 @Local(value = {VMTemplateZoneDao.class})
 public class VMTemplateZoneDaoImpl extends GenericDaoBase<VMTemplateZoneVO, Long> implements VMTemplateZoneDao {
-    public static final Logger s_logger = Logger.getLogger(VMTemplateZoneDaoImpl.class.getName());
 
     protected final SearchBuilder<VMTemplateZoneVO> ZoneSearch;
     protected final SearchBuilder<VMTemplateZoneVO> TemplateSearch;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
index 85d08b8..e260770 100644
--- a/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
@@ -26,7 +26,6 @@ import java.util.List;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.exception.InvalidParameterValueException;
@@ -55,7 +54,6 @@ import com.cloud.utils.exception.CloudRuntimeException;
 @Component
 @Local(value = VolumeDao.class)
 public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long> implements VolumeDao {
-    private static final Logger s_logger = Logger.getLogger(VolumeDaoImpl.class);
     protected final SearchBuilder<VolumeVO> DetachedAccountIdSearch;
     protected final SearchBuilder<VolumeVO> TemplateZoneSearch;
     protected final GenericSearchBuilder<VolumeVO, SumCount> TotalSizeByPoolSearch;
@@ -268,7 +266,7 @@ public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long> implements Vol
                 else if (scope == ScopeType.ZONE)
                     sql = SELECT_HYPERTYPE_FROM_ZONE_VOLUME;
                 else
-                    s_logger.error("Unhandled scope type '" + scope + "' when running getHypervisorType on volume id " + volumeId);
+                    logger.error("Unhandled scope type '" + scope + "' when running getHypervisorType on volume id " + volumeId);
 
                 pstmt = txn.prepareAutoCloseStatement(sql);
                 pstmt.setLong(1, volumeId);
@@ -297,7 +295,7 @@ public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long> implements Vol
         } else if (type.equals(HypervisorType.VMware)) {
             return ImageFormat.OVA;
         } else {
-            s_logger.warn("Do not support hypervisor " + type.toString());
+            logger.warn("Do not support hypervisor " + type.toString());
             return null;
         }
     }
@@ -483,7 +481,7 @@ public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long> implements Vol
         builder.set(vo, "updated", new Date());
 
         int rows = update((VolumeVO)vo, sc);
-        if (rows == 0 && s_logger.isDebugEnabled()) {
+        if (rows == 0 && logger.isDebugEnabled()) {
             VolumeVO dbVol = findByIdIncludingRemoved(vo.getId());
             if (dbVol != null) {
                 StringBuilder str = new StringBuilder("Unable to update ").append(vo.toString());
@@ -516,7 +514,7 @@ public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long> implements Vol
                     .append("; updatedTime=")
                     .append(oldUpdatedTime);
             } else {
-                s_logger.debug("Unable to update volume: id=" + vo.getId() + ", as there is no such volume exists in the database anymore");
+                logger.debug("Unable to update volume: id=" + vo.getId() + ", as there is no such volume exists in the database anymore");
             }
         }
         return rows > 0;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/storage/dao/VolumeHostDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/VolumeHostDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/VolumeHostDaoImpl.java
index 2820061..8922a80 100644
--- a/engine/schema/src/com/cloud/storage/dao/VolumeHostDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/VolumeHostDaoImpl.java
@@ -21,7 +21,6 @@ import java.util.List;
 
 import javax.ejb.Local;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore;
@@ -38,7 +37,6 @@ import com.cloud.utils.db.UpdateBuilder;
 @Component
 @Local(value = {VolumeHostDao.class})
 public class VolumeHostDaoImpl extends GenericDaoBase<VolumeHostVO, Long> implements VolumeHostDao {
-    private static final Logger s_logger = Logger.getLogger(VolumeHostDaoImpl.class);
     protected final SearchBuilder<VolumeHostVO> HostVolumeSearch;
     protected final SearchBuilder<VolumeHostVO> ZoneVolumeSearch;
     protected final SearchBuilder<VolumeHostVO> VolumeSearch;
@@ -141,7 +139,7 @@ public class VolumeHostDaoImpl extends GenericDaoBase<VolumeHostVO, Long> implem
         builder.set(vo, "updated", new Date());
 
         int rows = update((VolumeHostVO)vo, sc);
-        if (rows == 0 && s_logger.isDebugEnabled()) {
+        if (rows == 0 && logger.isDebugEnabled()) {
             VolumeHostVO dbVol = findByIdIncludingRemoved(volHost.getId());
             if (dbVol != null) {
                 StringBuilder str = new StringBuilder("Unable to update ").append(vo.toString());
@@ -174,7 +172,7 @@ public class VolumeHostDaoImpl extends GenericDaoBase<VolumeHostVO, Long> implem
                     .append("; updatedTime=")
                     .append(oldUpdatedTime);
             } else {
-                s_logger.debug("Unable to update objectIndatastore: id=" + volHost.getId() + ", as there is no such object exists in the database anymore");
+                logger.debug("Unable to update objectIndatastore: id=" + volHost.getId() + ", as there is no such object exists in the database anymore");
             }
         }
         return rows > 0;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/upgrade/DatabaseIntegrityChecker.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/DatabaseIntegrityChecker.java b/engine/schema/src/com/cloud/upgrade/DatabaseIntegrityChecker.java
index 2001fae..8a27735 100644
--- a/engine/schema/src/com/cloud/upgrade/DatabaseIntegrityChecker.java
+++ b/engine/schema/src/com/cloud/upgrade/DatabaseIntegrityChecker.java
@@ -24,7 +24,6 @@ import java.sql.SQLException;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.maint.Version;
@@ -39,7 +38,6 @@ import com.cloud.utils.exception.CloudRuntimeException;
 @Component
 @Local(value = {SystemIntegrityChecker.class})
 public class DatabaseIntegrityChecker extends AdapterBase implements SystemIntegrityChecker {
-    private static final Logger s_logger = Logger.getLogger(DatabaseIntegrityChecker.class);
 
     @Inject
     VersionDao _dao;
@@ -103,32 +101,32 @@ public class DatabaseIntegrityChecker extends AdapterBase implements SystemInteg
                                 }
                                 catch (Exception e)
                                 {
-                                    s_logger.error("checkDuplicateHostWithTheSameLocalStorage: Exception :" + e.getMessage());
+                                    logger.error("checkDuplicateHostWithTheSameLocalStorage: Exception :" + e.getMessage());
                                     throw new CloudRuntimeException("checkDuplicateHostWithTheSameLocalStorage: Exception :" + e.getMessage(),e);
                                 }
                         }
                         catch (Exception e)
                         {
-                                s_logger.error("checkDuplicateHostWithTheSameLocalStorage: Exception :" + e.getMessage());
+                                logger.error("checkDuplicateHostWithTheSameLocalStorage: Exception :" + e.getMessage());
                                 throw new CloudRuntimeException("checkDuplicateHostWithTheSameLocalStorage: Exception :" + e.getMessage(),e);
                         }
                     }
                     if (noDuplicate) {
-                        s_logger.debug("No duplicate hosts with the same local storage found in database");
+                        logger.debug("No duplicate hosts with the same local storage found in database");
                     } else {
-                        s_logger.error(helpInfo.toString());
+                        logger.error(helpInfo.toString());
                     }
                     txn.commit();
                     return noDuplicate;
             }catch (Exception e)
             {
-                  s_logger.error("checkDuplicateHostWithTheSameLocalStorage: Exception :" + e.getMessage());
+                  logger.error("checkDuplicateHostWithTheSameLocalStorage: Exception :" + e.getMessage());
                   throw new CloudRuntimeException("checkDuplicateHostWithTheSameLocalStorage: Exception :" + e.getMessage(),e);
             }
         }
         catch (Exception e)
         {
-            s_logger.error("checkDuplicateHostWithTheSameLocalStorage: Exception :" + e.getMessage());
+            logger.error("checkDuplicateHostWithTheSameLocalStorage: Exception :" + e.getMessage());
             throw new CloudRuntimeException("checkDuplicateHostWithTheSameLocalStorage: Exception :" + e.getMessage(),e);
         }
         finally
@@ -139,7 +137,7 @@ public class DatabaseIntegrityChecker extends AdapterBase implements SystemInteg
                 }
             }catch(Exception e)
             {
-                s_logger.error("checkDuplicateHostWithTheSameLocalStorage: Exception:"+ e.getMessage());
+                logger.error("checkDuplicateHostWithTheSameLocalStorage: Exception:"+ e.getMessage());
             }
         }
     }
@@ -152,7 +150,7 @@ public class DatabaseIntegrityChecker extends AdapterBase implements SystemInteg
                 String tableName = rs.getString(1);
                 if (tableName.equalsIgnoreCase("usage_event") || tableName.equalsIgnoreCase("usage_port_forwarding") || tableName.equalsIgnoreCase("usage_network_offering")) {
                     num++;
-                    s_logger.debug("Checking 21to22PremiumUprage table " + tableName + " found");
+                    logger.debug("Checking 21to22PremiumUprage table " + tableName + " found");
                 }
                 if (num == 3) {
                     return true;
@@ -168,7 +166,7 @@ public class DatabaseIntegrityChecker extends AdapterBase implements SystemInteg
             boolean found = false;
             while (rs.next()) {
                 if (column.equalsIgnoreCase(rs.getString(1))) {
-                    s_logger.debug(String.format("Column %1$s.%2$s.%3$s found", dbName, tableName, column));
+                    logger.debug(String.format("Column %1$s.%2$s.%3$s found", dbName, tableName, column));
                     found = true;
                     break;
                 }
@@ -225,33 +223,33 @@ public class DatabaseIntegrityChecker extends AdapterBase implements SystemInteg
                     }
                 }
                 if (!hasUsage) {
-                    s_logger.debug("No cloud_usage found in database, no need to check missed premium upgrade");
+                    logger.debug("No cloud_usage found in database, no need to check missed premium upgrade");
                     txn.commit();
                     return true;
                 }
                 if (!check21to22PremiumUprage(conn)) {
-                    s_logger.error("21to22 premium upgrade missed");
+                    logger.error("21to22 premium upgrade missed");
                     txn.commit();
                     return false;
                 }
                 if (!check221to222PremiumUprage(conn)) {
-                    s_logger.error("221to222 premium upgrade missed");
+                    logger.error("221to222 premium upgrade missed");
                     txn.commit();
                     return false;
                 }
                 if (!check222to224PremiumUpgrade(conn)) {
-                    s_logger.error("222to224 premium upgrade missed");
+                    logger.error("222to224 premium upgrade missed");
                     txn.commit();
                     return false;
                 }
                 txn.commit();
                 return true;
             } catch (Exception e) {
-                s_logger.error("checkMissedPremiumUpgradeFor228: Exception:" + e.getMessage());
+                logger.error("checkMissedPremiumUpgradeFor228: Exception:" + e.getMessage());
                 throw new CloudRuntimeException("checkMissedPremiumUpgradeFor228: Exception:" + e.getMessage(), e);
             }
         }catch (Exception e) {
-            s_logger.error("checkMissedPremiumUpgradeFor228: Exception:"+ e.getMessage());
+            logger.error("checkMissedPremiumUpgradeFor228: Exception:"+ e.getMessage());
             throw new CloudRuntimeException("checkMissedPremiumUpgradeFor228: Exception:" + e.getMessage(),e);
         }
         finally
@@ -262,7 +260,7 @@ public class DatabaseIntegrityChecker extends AdapterBase implements SystemInteg
                 }
             }catch(Exception e)
             {
-                s_logger.error("checkMissedPremiumUpgradeFor228: Exception:"+ e.getMessage());
+                logger.error("checkMissedPremiumUpgradeFor228: Exception:"+ e.getMessage());
             }
         }
     }
@@ -271,19 +269,19 @@ public class DatabaseIntegrityChecker extends AdapterBase implements SystemInteg
     public void check() {
         GlobalLock lock = GlobalLock.getInternLock("DatabaseIntegrity");
         try {
-            s_logger.info("Grabbing lock to check for database integrity.");
+            logger.info("Grabbing lock to check for database integrity.");
             if (!lock.lock(20 * 60)) {
                 throw new CloudRuntimeException("Unable to acquire lock to check for database integrity.");
             }
 
             try {
-                s_logger.info("Performing database integrity check");
+                logger.info("Performing database integrity check");
                 if (!checkDuplicateHostWithTheSameLocalStorage()) {
                     throw new CloudRuntimeException("checkDuplicateHostWithTheSameLocalStorage detected error");
                 }
 
                 if (!checkMissedPremiumUpgradeFor228()) {
-                    s_logger.error("Your current database version is 2.2.8, management server detected some missed premium upgrade, please contact CloudStack support and attach log file. Thank you!");
+                    logger.error("Your current database version is 2.2.8, management server detected some missed premium upgrade, please contact CloudStack support and attach log file. Thank you!");
                     throw new CloudRuntimeException("Detected missed premium upgrade");
                 }
             } finally {
@@ -299,7 +297,7 @@ public class DatabaseIntegrityChecker extends AdapterBase implements SystemInteg
         try {
             check();
         } catch (Exception e) {
-            s_logger.error("System integrity check exception", e);
+            logger.error("System integrity check exception", e);
             System.exit(1);
         }
         return true;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java b/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java
index 0fb2dfe..fb462c2 100644
--- a/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java
@@ -24,7 +24,6 @@ import java.util.List;
 
 import javax.ejb.Local;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.upgrade.dao.VersionVO.Step;
@@ -42,7 +41,6 @@ import com.cloud.utils.exception.CloudRuntimeException;
 @Local(value = VersionDao.class)
 @DB()
 public class VersionDaoImpl extends GenericDaoBase<VersionVO, Long> implements VersionDao {
-    private static final Logger s_logger = Logger.getLogger(VersionDaoImpl.class);
 
     final GenericSearchBuilder<VersionVO, String> CurrentVersionSearch;
     final SearchBuilder<VersionVO> AllFieldsSearch;
@@ -76,7 +74,7 @@ public class VersionDaoImpl extends GenericDaoBase<VersionVO, Long> implements V
     @DB
     public String getCurrentVersion() {
         try (Connection conn = TransactionLegacy.getStandaloneConnection();) {
-            s_logger.debug("Checking to see if the database is at a version before it was the version table is created");
+            logger.debug("Checking to see if the database is at a version before it was the version table is created");
 
             try (
                     PreparedStatement pstmt = conn.prepareStatement("SHOW TABLES LIKE 'version'");
@@ -91,8 +89,8 @@ public class VersionDaoImpl extends GenericDaoBase<VersionVO, Long> implements V
                                 pstmt_domain.executeQuery();
                                 return "2.1.8";
                             } catch (final SQLException e) {
-                                s_logger.debug("Assuming the exception means domain_id is not there.");
-                                s_logger.debug("No version table and no nics table, returning 2.1.7");
+                                logger.debug("Assuming the exception means domain_id is not there.");
+                                logger.debug("No version table and no nics table, returning 2.1.7");
                                 return "2.1.7";
                             }
                         } else {
@@ -100,7 +98,7 @@ public class VersionDaoImpl extends GenericDaoBase<VersionVO, Long> implements V
                                  ResultSet rs_static_nat = pstmt_static_nat.executeQuery();){
                                 return "2.2.1";
                             } catch (final SQLException e) {
-                                s_logger.debug("Assuming the exception means static_nat field doesn't exist in firewall_rules table, returning version 2.2.2");
+                                logger.debug("Assuming the exception means static_nat field doesn't exist in firewall_rules table, returning version 2.2.2");
                                 return "2.2.2";
                             }
                         }
@@ -127,7 +125,7 @@ public class VersionDaoImpl extends GenericDaoBase<VersionVO, Long> implements V
                 }
 
                 // Use nics table information and is_static_nat field from firewall_rules table to determine version information
-                s_logger.debug("Version table exists, but it's empty; have to confirm that version is 2.2.2");
+                logger.debug("Version table exists, but it's empty; have to confirm that version is 2.2.2");
                 try (PreparedStatement pstmt = conn.prepareStatement("SHOW TABLES LIKE 'nics'");
                      ResultSet rs = pstmt.executeQuery();){
                     if (!rs.next()) {
@@ -138,7 +136,7 @@ public class VersionDaoImpl extends GenericDaoBase<VersionVO, Long> implements V
                             throw new CloudRuntimeException("Unable to determine the current version, version table exists and empty, " +
                                     "nics table doesn't exist, is_static_nat field exists in firewall_rules table");
                         } catch (final SQLException e) {
-                            s_logger.debug("Assuming the exception means static_nat field doesn't exist in firewall_rules table, returning version 2.2.2");
+                            logger.debug("Assuming the exception means static_nat field doesn't exist in firewall_rules table, returning version 2.2.2");
                             return "2.2.2";
                         }
                     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
index 93ddf9b..70adff4 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
@@ -27,7 +27,6 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.exception.CloudRuntimeException;
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import javax.ejb.Local;
@@ -42,7 +41,6 @@ import java.util.TimeZone;
 @Component
 @Local(value = {UsageDao.class})
 public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements UsageDao {
-    public static final Logger s_logger = Logger.getLogger(UsageDaoImpl.class.getName());
     private static final String DELETE_ALL = "DELETE FROM cloud_usage";
     private static final String DELETE_ALL_BY_ACCOUNTID = "DELETE FROM cloud_usage WHERE account_id = ?";
     private static final String DELETE_ALL_BY_INTERVAL = "DELETE FROM cloud_usage WHERE end_date < DATE_SUB(CURRENT_DATE(), INTERVAL ? DAY)";
@@ -92,7 +90,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
             txn.commit();
         } catch (Exception ex) {
             txn.rollback();
-            s_logger.error("error retrieving usage vm instances for account id: " + accountId);
+            logger.error("error retrieving usage vm instances for account id: " + accountId);
         } finally {
             txn.close();
         }
@@ -132,7 +130,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
             txn.commit();
         } catch (Exception ex) {
             txn.rollback();
-            s_logger.error("error saving account to cloud_usage db", ex);
+            logger.error("error saving account to cloud_usage db", ex);
             throw new CloudRuntimeException(ex.getMessage());
         }
     }
@@ -162,7 +160,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
             txn.commit();
         } catch (Exception ex) {
             txn.rollback();
-            s_logger.error("error saving account to cloud_usage db", ex);
+            logger.error("error saving account to cloud_usage db", ex);
             throw new CloudRuntimeException(ex.getMessage());
         }
     }
@@ -203,7 +201,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
             txn.commit();
         } catch (Exception ex) {
             txn.rollback();
-            s_logger.error("error saving user stats to cloud_usage db", ex);
+            logger.error("error saving user stats to cloud_usage db", ex);
             throw new CloudRuntimeException(ex.getMessage());
         }
     }
@@ -230,7 +228,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
             txn.commit();
         } catch (Exception ex) {
             txn.rollback();
-            s_logger.error("error saving user stats to cloud_usage db", ex);
+            logger.error("error saving user stats to cloud_usage db", ex);
             throw new CloudRuntimeException(ex.getMessage());
         }
     }
@@ -247,7 +245,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
                 return Long.valueOf(rs.getLong(1));
             }
         } catch (Exception ex) {
-            s_logger.error("error getting last account id", ex);
+            logger.error("error getting last account id", ex);
         }
         return null;
     }
@@ -264,7 +262,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
                 return Long.valueOf(rs.getLong(1));
             }
         } catch (Exception ex) {
-            s_logger.error("error getting last user stats id", ex);
+            logger.error("error getting last user stats id", ex);
         }
         return null;
     }
@@ -283,7 +281,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
                 templateList.add(Long.valueOf(rs.getLong(1)));
             }
         } catch (Exception ex) {
-            s_logger.error("error listing public templates", ex);
+            logger.error("error listing public templates", ex);
         }
         return templateList;
     }
@@ -300,7 +298,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
                 return Long.valueOf(rs.getLong(1));
             }
         } catch (Exception ex) {
-            s_logger.error("error getting last vm disk stats id", ex);
+            logger.error("error getting last vm disk stats id", ex);
         }
         return null;
     }
@@ -333,7 +331,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
             txn.commit();
         } catch (Exception ex) {
             txn.rollback();
-            s_logger.error("error saving vm disk stats to cloud_usage db", ex);
+            logger.error("error saving vm disk stats to cloud_usage db", ex);
             throw new CloudRuntimeException(ex.getMessage());
         }
 
@@ -379,7 +377,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
             txn.commit();
         } catch (Exception ex) {
             txn.rollback();
-            s_logger.error("error saving vm disk stats to cloud_usage db", ex);
+            logger.error("error saving vm disk stats to cloud_usage db", ex);
             throw new CloudRuntimeException(ex.getMessage());
         }
 
@@ -446,7 +444,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
             txn.commit();
         } catch (Exception ex) {
             txn.rollback();
-            s_logger.error("error saving usage records to cloud_usage db", ex);
+            logger.error("error saving usage records to cloud_usage db", ex);
             throw new CloudRuntimeException(ex.getMessage());
         }
     }
@@ -464,7 +462,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
             txn.commit();
         } catch (Exception ex) {
             txn.rollback();
-            s_logger.error("error removing old cloud_usage records for interval: " + days);
+            logger.error("error removing old cloud_usage records for interval: " + days);
         } finally {
             txn.close();
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/usage/dao/UsageIPAddressDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageIPAddressDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageIPAddressDaoImpl.java
index 358e638..f3ea701 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageIPAddressDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageIPAddressDaoImpl.java
@@ -27,7 +27,6 @@ import java.util.TimeZone;
 import javax.ejb.Local;
 
 import com.cloud.exception.CloudException;
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.usage.UsageIPAddressVO;
@@ -38,7 +37,6 @@ import com.cloud.utils.db.TransactionLegacy;
 @Component
 @Local(value = {UsageIPAddressDao.class})
 public class UsageIPAddressDaoImpl extends GenericDaoBase<UsageIPAddressVO, Long> implements UsageIPAddressDao {
-    public static final Logger s_logger = Logger.getLogger(UsageIPAddressDaoImpl.class.getName());
 
     protected static final String UPDATE_RELEASED = "UPDATE usage_ip_address SET released = ? WHERE account_id = ? AND public_ip_address = ? and released IS NULL";
     protected static final String GET_USAGE_RECORDS_BY_ACCOUNT =
@@ -77,7 +75,7 @@ public class UsageIPAddressDaoImpl extends GenericDaoBase<UsageIPAddressVO, Long
             txn.commit();
         } catch (Exception e) {
             txn.rollback();
-            s_logger.error("Error updating usageIPAddressVO:"+e.getMessage(), e);
+            logger.error("Error updating usageIPAddressVO:"+e.getMessage(), e);
         } finally {
             txn.close();
         }
@@ -142,7 +140,7 @@ public class UsageIPAddressDaoImpl extends GenericDaoBase<UsageIPAddressVO, Long
             }
         } catch (Exception e) {
             txn.rollback();
-            s_logger.warn("Error getting usage records", e);
+            logger.warn("Error getting usage records", e);
         } finally {
             txn.close();
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/usage/dao/UsageJobDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageJobDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageJobDaoImpl.java
index 0a73dd9..7d26a60 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageJobDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageJobDaoImpl.java
@@ -23,7 +23,6 @@ import java.util.List;
 
 import javax.ejb.Local;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.usage.UsageJobVO;
@@ -36,7 +35,6 @@ import com.cloud.utils.exception.CloudRuntimeException;
 @Component
 @Local(value = {UsageJobDao.class})
 public class UsageJobDaoImpl extends GenericDaoBase<UsageJobVO, Long> implements UsageJobDao {
-    private static final Logger s_logger = Logger.getLogger(UsageJobDaoImpl.class.getName());
 
     private static final String GET_LAST_JOB_SUCCESS_DATE_MILLIS =
         "SELECT end_millis FROM cloud_usage.usage_job WHERE end_millis > 0 and success = 1 ORDER BY end_millis DESC LIMIT 1";
@@ -53,7 +51,7 @@ public class UsageJobDaoImpl extends GenericDaoBase<UsageJobVO, Long> implements
                 return rs.getLong(1);
             }
         } catch (Exception ex) {
-            s_logger.error("error getting last usage job success date", ex);
+            logger.error("error getting last usage job success date", ex);
         } finally {
             txn.close();
         }
@@ -79,7 +77,7 @@ public class UsageJobDaoImpl extends GenericDaoBase<UsageJobVO, Long> implements
             txn.commit();
         } catch (Exception ex) {
             txn.rollback();
-            s_logger.error("error updating job success date", ex);
+            logger.error("error updating job success date", ex);
             throw new CloudRuntimeException(ex.getMessage());
         } finally {
             txn.close();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/usage/dao/UsageLoadBalancerPolicyDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageLoadBalancerPolicyDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageLoadBalancerPolicyDaoImpl.java
index abace04..20ee05b 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageLoadBalancerPolicyDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageLoadBalancerPolicyDaoImpl.java
@@ -27,7 +27,6 @@ import java.util.TimeZone;
 import javax.ejb.Local;
 
 import com.cloud.exception.CloudException;
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.usage.UsageLoadBalancerPolicyVO;
@@ -38,7 +37,6 @@ import com.cloud.utils.db.TransactionLegacy;
 @Component
 @Local(value = {UsageLoadBalancerPolicyDao.class})
 public class UsageLoadBalancerPolicyDaoImpl extends GenericDaoBase<UsageLoadBalancerPolicyVO, Long> implements UsageLoadBalancerPolicyDao {
-    public static final Logger s_logger = Logger.getLogger(UsageLoadBalancerPolicyDaoImpl.class.getName());
 
     protected static final String REMOVE_BY_USERID_LBID = "DELETE FROM usage_load_balancer_policy WHERE account_id = ? AND id = ?";
     protected static final String UPDATE_DELETED = "UPDATE usage_load_balancer_policy SET deleted = ? WHERE account_id = ? AND id = ? and deleted IS NULL";
@@ -66,7 +64,7 @@ public class UsageLoadBalancerPolicyDaoImpl extends GenericDaoBase<UsageLoadBala
             txn.commit();
         } catch (Exception e) {
             txn.rollback();
-            s_logger.warn("Error removing UsageLoadBalancerPolicyVO", e);
+            logger.warn("Error removing UsageLoadBalancerPolicyVO", e);
         } finally {
             txn.close();
         }
@@ -92,7 +90,7 @@ public class UsageLoadBalancerPolicyDaoImpl extends GenericDaoBase<UsageLoadBala
             txn.commit();
         } catch (Exception e) {
             txn.rollback();
-            s_logger.warn("Error updating UsageLoadBalancerPolicyVO"+e.getMessage(), e);
+            logger.warn("Error updating UsageLoadBalancerPolicyVO"+e.getMessage(), e);
         } finally {
             txn.close();
         }
@@ -161,7 +159,7 @@ public class UsageLoadBalancerPolicyDaoImpl extends GenericDaoBase<UsageLoadBala
             }
         } catch (Exception e) {
             txn.rollback();
-            s_logger.warn("Error getting usage records", e);
+            logger.warn("Error getting usage records", e);
         } finally {
             txn.close();
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/usage/dao/UsageNetworkDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageNetworkDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageNetworkDaoImpl.java
index 12cbc43..0b8c0a2 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageNetworkDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageNetworkDaoImpl.java
@@ -24,7 +24,6 @@ import java.util.Map;
 
 import javax.ejb.Local;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.usage.UsageNetworkVO;
@@ -35,7 +34,6 @@ import com.cloud.utils.exception.CloudRuntimeException;
 @Component
 @Local(value = {UsageNetworkDao.class})
 public class UsageNetworkDaoImpl extends GenericDaoBase<UsageNetworkVO, Long> implements UsageNetworkDao {
-    private static final Logger s_logger = Logger.getLogger(UsageVMInstanceDaoImpl.class.getName());
     private static final String SELECT_LATEST_STATS =
         "SELECT u.account_id, u.zone_id, u.host_id, u.host_type, u.network_id, u.bytes_sent, u.bytes_received, u.agg_bytes_received, u.agg_bytes_sent, u.event_time_millis "
             + "FROM cloud_usage.usage_network u INNER JOIN (SELECT netusage.account_id as acct_id, netusage.zone_id as z_id, max(netusage.event_time_millis) as max_date "
@@ -79,7 +77,7 @@ public class UsageNetworkDaoImpl extends GenericDaoBase<UsageNetworkVO, Long> im
             }
             return returnMap;
         } catch (Exception ex) {
-            s_logger.error("error getting recent usage network stats", ex);
+            logger.error("error getting recent usage network stats", ex);
         } finally {
             txn.close();
         }
@@ -99,7 +97,7 @@ public class UsageNetworkDaoImpl extends GenericDaoBase<UsageNetworkVO, Long> im
             txn.commit();
         } catch (Exception ex) {
             txn.rollback();
-            s_logger.error("error deleting old usage network stats", ex);
+            logger.error("error deleting old usage network stats", ex);
         }
     }
 
@@ -128,7 +126,7 @@ public class UsageNetworkDaoImpl extends GenericDaoBase<UsageNetworkVO, Long> im
             txn.commit();
         } catch (Exception ex) {
             txn.rollback();
-            s_logger.error("error saving usage_network to cloud_usage db", ex);
+            logger.error("error saving usage_network to cloud_usage db", ex);
             throw new CloudRuntimeException(ex.getMessage());
         }
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/usage/dao/UsageNetworkOfferingDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageNetworkOfferingDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageNetworkOfferingDaoImpl.java
index 2661d4e..4905372 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageNetworkOfferingDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageNetworkOfferingDaoImpl.java
@@ -27,7 +27,6 @@ import java.util.TimeZone;
 import javax.ejb.Local;
 
 import com.cloud.exception.CloudException;
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.usage.UsageNetworkOfferingVO;
@@ -38,7 +37,6 @@ import com.cloud.utils.db.TransactionLegacy;
 @Component
 @Local(value = {UsageNetworkOfferingDao.class})
 public class UsageNetworkOfferingDaoImpl extends GenericDaoBase<UsageNetworkOfferingVO, Long> implements UsageNetworkOfferingDao {
-    public static final Logger s_logger = Logger.getLogger(UsageNetworkOfferingDaoImpl.class.getName());
 
     protected static final String UPDATE_DELETED =
         "UPDATE usage_network_offering SET deleted = ? WHERE account_id = ? AND vm_instance_id = ? AND network_offering_id = ? and deleted IS NULL";
@@ -76,7 +74,7 @@ public class UsageNetworkOfferingDaoImpl extends GenericDaoBase<UsageNetworkOffe
             txn.commit();
         } catch (Exception e) {
             txn.rollback();
-            s_logger.warn("Error updating UsageNetworkOfferingVO:"+e.getMessage(), e);
+            logger.warn("Error updating UsageNetworkOfferingVO:"+e.getMessage(), e);
         } finally {
             txn.close();
         }
@@ -148,7 +146,7 @@ public class UsageNetworkOfferingDaoImpl extends GenericDaoBase<UsageNetworkOffe
             }
         } catch (Exception e) {
             txn.rollback();
-            s_logger.warn("Error getting usage records", e);
+            logger.warn("Error getting usage records", e);
         } finally {
             txn.close();
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/usage/dao/UsagePortForwardingRuleDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsagePortForwardingRuleDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsagePortForwardingRuleDaoImpl.java
index d2053e8..9783fec 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsagePortForwardingRuleDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsagePortForwardingRuleDaoImpl.java
@@ -27,7 +27,6 @@ import java.util.TimeZone;
 import javax.ejb.Local;
 
 import com.cloud.exception.CloudException;
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.usage.UsagePortForwardingRuleVO;
@@ -38,7 +37,6 @@ import com.cloud.utils.db.TransactionLegacy;
 @Component
 @Local(value = {UsagePortForwardingRuleDao.class})
 public class UsagePortForwardingRuleDaoImpl extends GenericDaoBase<UsagePortForwardingRuleVO, Long> implements UsagePortForwardingRuleDao {
-    public static final Logger s_logger = Logger.getLogger(UsagePortForwardingRuleDaoImpl.class.getName());
 
     protected static final String REMOVE_BY_USERID_PFID = "DELETE FROM usage_port_forwarding WHERE account_id = ? AND id = ?";
     protected static final String UPDATE_DELETED = "UPDATE usage_port_forwarding SET deleted = ? WHERE account_id = ? AND id = ? and deleted IS NULL";
@@ -66,7 +64,7 @@ public class UsagePortForwardingRuleDaoImpl extends GenericDaoBase<UsagePortForw
             txn.commit();
         } catch (Exception e) {
             txn.rollback();
-            s_logger.warn("Error removing UsagePortForwardingRuleVO", e);
+            logger.warn("Error removing UsagePortForwardingRuleVO", e);
         } finally {
             txn.close();
         }
@@ -92,7 +90,7 @@ public class UsagePortForwardingRuleDaoImpl extends GenericDaoBase<UsagePortForw
             txn.commit();
         } catch (Exception e) {
             txn.rollback();
-            s_logger.warn("Error updating UsagePortForwardingRuleVO:"+e.getMessage(), e);
+            logger.warn("Error updating UsagePortForwardingRuleVO:"+e.getMessage(), e);
         } finally {
             txn.close();
         }
@@ -161,7 +159,7 @@ public class UsagePortForwardingRuleDaoImpl extends GenericDaoBase<UsagePortForw
             }
         } catch (Exception e) {
             txn.rollback();
-            s_logger.warn("Error getting usage records", e);
+            logger.warn("Error getting usage records", e);
         } finally {
             txn.close();
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/usage/dao/UsageSecurityGroupDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageSecurityGroupDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageSecurityGroupDaoImpl.java
index 2305018..26a420a 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageSecurityGroupDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageSecurityGroupDaoImpl.java
@@ -27,7 +27,6 @@ import java.util.TimeZone;
 import javax.ejb.Local;
 
 import com.cloud.exception.CloudException;
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.usage.UsageSecurityGroupVO;
@@ -38,7 +37,6 @@ import com.cloud.utils.db.TransactionLegacy;
 @Component
 @Local(value = {UsageSecurityGroupDao.class})
 public class UsageSecurityGroupDaoImpl extends GenericDaoBase<UsageSecurityGroupVO, Long> implements UsageSecurityGroupDao {
-    public static final Logger s_logger = Logger.getLogger(UsageSecurityGroupDaoImpl.class.getName());
 
     protected static final String UPDATE_DELETED =
         "UPDATE usage_security_group SET deleted = ? WHERE account_id = ? AND vm_instance_id = ? AND security_group_id = ? and deleted IS NULL";
@@ -76,7 +74,7 @@ public class UsageSecurityGroupDaoImpl extends GenericDaoBase<UsageSecurityGroup
             txn.commit();
         } catch (Exception e) {
             txn.rollback();
-            s_logger.warn("Error updating UsageSecurityGroupVO:"+e.getMessage(), e);
+            logger.warn("Error updating UsageSecurityGroupVO:"+e.getMessage(), e);
         } finally {
             txn.close();
         }
@@ -144,7 +142,7 @@ public class UsageSecurityGroupDaoImpl extends GenericDaoBase<UsageSecurityGroup
             }
         } catch (Exception e) {
             txn.rollback();
-            s_logger.warn("Error getting usage records:"+e.getMessage(), e);
+            logger.warn("Error getting usage records:"+e.getMessage(), e);
         } finally {
             txn.close();
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/usage/dao/UsageStorageDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageStorageDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageStorageDaoImpl.java
index 2252275..7876b0c 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageStorageDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageStorageDaoImpl.java
@@ -27,7 +27,6 @@ import java.util.TimeZone;
 import javax.ejb.Local;
 
 import com.cloud.exception.CloudException;
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.usage.UsageStorageVO;
@@ -40,7 +39,6 @@ import com.cloud.utils.db.TransactionLegacy;
 @Component
 @Local(value = {UsageStorageDao.class})
 public class UsageStorageDaoImpl extends GenericDaoBase<UsageStorageVO, Long> implements UsageStorageDao {
-    public static final Logger s_logger = Logger.getLogger(UsageStorageDaoImpl.class.getName());
 
     protected static final String REMOVE_BY_USERID_STORAGEID = "DELETE FROM usage_storage WHERE account_id = ? AND id = ? AND storage_type = ?";
     protected static final String UPDATE_DELETED = "UPDATE usage_storage SET deleted = ? WHERE account_id = ? AND id = ? AND storage_type = ? and deleted IS NULL";
@@ -108,7 +106,7 @@ public class UsageStorageDaoImpl extends GenericDaoBase<UsageStorageVO, Long> im
             txn.commit();
         } catch (Exception e) {
             txn.rollback();
-            s_logger.error("Error removing usageStorageVO", e);
+            logger.error("Error removing usageStorageVO", e);
         } finally {
             txn.close();
         }
@@ -136,7 +134,7 @@ public class UsageStorageDaoImpl extends GenericDaoBase<UsageStorageVO, Long> im
             txn.commit();
         } catch (Exception e) {
             txn.rollback();
-            s_logger.error("Error updating UsageStorageVO:"+e.getMessage(), e);
+            logger.error("Error updating UsageStorageVO:"+e.getMessage(), e);
         } finally {
             txn.close();
         }
@@ -210,7 +208,7 @@ public class UsageStorageDaoImpl extends GenericDaoBase<UsageStorageVO, Long> im
             }
         }catch (Exception e) {
             txn.rollback();
-            s_logger.error("getUsageRecords:Exception:"+e.getMessage(), e);
+            logger.error("getUsageRecords:Exception:"+e.getMessage(), e);
         } finally {
             txn.close();
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/usage/dao/UsageVMInstanceDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageVMInstanceDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageVMInstanceDaoImpl.java
index 930ad89..4817b7d 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageVMInstanceDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageVMInstanceDaoImpl.java
@@ -25,7 +25,6 @@ import java.util.TimeZone;
 
 import javax.ejb.Local;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.usage.UsageVMInstanceVO;
@@ -36,7 +35,6 @@ import com.cloud.utils.db.TransactionLegacy;
 @Component
 @Local(value = {UsageVMInstanceDao.class})
 public class UsageVMInstanceDaoImpl extends GenericDaoBase<UsageVMInstanceVO, Long> implements UsageVMInstanceDao {
-    public static final Logger s_logger = Logger.getLogger(UsageVMInstanceDaoImpl.class.getName());
 
     protected static final String UPDATE_USAGE_INSTANCE_SQL = "UPDATE usage_vm_instance SET end_date = ? "
         + "WHERE account_id = ? and vm_instance_id = ? and usage_type = ? and end_date IS NULL";
@@ -64,7 +62,7 @@ public class UsageVMInstanceDaoImpl extends GenericDaoBase<UsageVMInstanceVO, Lo
             pstmt.executeUpdate();
             txn.commit();
         } catch (Exception e) {
-            s_logger.warn(e);
+            logger.warn(e);
         } finally {
             txn.close();
         }
@@ -85,7 +83,7 @@ public class UsageVMInstanceDaoImpl extends GenericDaoBase<UsageVMInstanceVO, Lo
             txn.commit();
         } catch (Exception ex) {
             txn.rollback();
-            s_logger.error("error deleting usage vm instance with vmId: " + instance.getVmInstanceId() + ", for account with id: " + instance.getAccountId());
+            logger.error("error deleting usage vm instance with vmId: " + instance.getVmInstanceId() + ", for account with id: " + instance.getAccountId());
         } finally {
             txn.close();
         }
@@ -143,7 +141,7 @@ public class UsageVMInstanceDaoImpl extends GenericDaoBase<UsageVMInstanceVO, Lo
                 usageInstances.add(usageInstance);
             }
         } catch (Exception ex) {
-            s_logger.error("error retrieving usage vm instances for account id: " + accountId, ex);
+            logger.error("error retrieving usage vm instances for account id: " + accountId, ex);
         } finally {
             txn.close();
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/usage/dao/UsageVMSnapshotDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageVMSnapshotDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageVMSnapshotDaoImpl.java
index 0f02c35..eb9821e 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageVMSnapshotDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageVMSnapshotDaoImpl.java
@@ -26,7 +26,6 @@ import java.util.TimeZone;
 
 import javax.ejb.Local;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.usage.UsageVMSnapshotVO;
@@ -37,7 +36,6 @@ import com.cloud.utils.db.TransactionLegacy;
 @Component
 @Local(value = {UsageVMSnapshotDao.class})
 public class UsageVMSnapshotDaoImpl extends GenericDaoBase<UsageVMSnapshotVO, Long> implements UsageVMSnapshotDao {
-    public static final Logger s_logger = Logger.getLogger(UsageVMSnapshotDaoImpl.class.getName());
     protected static final String GET_USAGE_RECORDS_BY_ACCOUNT = "SELECT id, zone_id, account_id, domain_id, vm_id, disk_offering_id, size, created, processed "
         + " FROM usage_vmsnapshot" + " WHERE account_id = ? " + " AND ( (created BETWEEN ? AND ?) OR "
         + "      (created < ? AND processed is NULL) ) ORDER BY created asc";
@@ -62,7 +60,7 @@ public class UsageVMSnapshotDaoImpl extends GenericDaoBase<UsageVMSnapshotVO, Lo
             txn.commit();
         } catch (Exception e) {
             txn.rollback();
-            s_logger.warn("Error updating UsageVMSnapshotVO", e);
+            logger.warn("Error updating UsageVMSnapshotVO", e);
         } finally {
             txn.close();
         }
@@ -112,7 +110,7 @@ public class UsageVMSnapshotDaoImpl extends GenericDaoBase<UsageVMSnapshotVO, Lo
             }
         } catch (Exception e) {
             txn.rollback();
-            s_logger.warn("Error getting usage records", e);
+            logger.warn("Error getting usage records", e);
         } finally {
             txn.close();
         }
@@ -163,7 +161,7 @@ public class UsageVMSnapshotDaoImpl extends GenericDaoBase<UsageVMSnapshotVO, Lo
             }
         } catch (Exception e) {
             txn.rollback();
-            s_logger.warn("Error getting usage records", e);
+            logger.warn("Error getting usage records", e);
         } finally {
             txn.close();
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/usage/dao/UsageVPNUserDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageVPNUserDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageVPNUserDaoImpl.java
index e2251df..0dd3b64 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageVPNUserDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageVPNUserDaoImpl.java
@@ -27,7 +27,6 @@ import java.util.TimeZone;
 import javax.ejb.Local;
 
 import com.cloud.exception.CloudException;
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.usage.UsageVPNUserVO;
@@ -38,7 +37,6 @@ import com.cloud.utils.db.TransactionLegacy;
 @Component
 @Local(value = {UsageVPNUserDao.class})
 public class UsageVPNUserDaoImpl extends GenericDaoBase<UsageVPNUserVO, Long> implements UsageVPNUserDao {
-    public static final Logger s_logger = Logger.getLogger(UsageVPNUserDaoImpl.class.getName());
 
     protected static final String UPDATE_DELETED = "UPDATE usage_vpn_user SET deleted = ? WHERE account_id = ? AND user_id = ? and deleted IS NULL";
     protected static final String GET_USAGE_RECORDS_BY_ACCOUNT = "SELECT zone_id, account_id, domain_id, user_id, user_name, created, deleted " + "FROM usage_vpn_user "
@@ -71,7 +69,7 @@ public class UsageVPNUserDaoImpl extends GenericDaoBase<UsageVPNUserVO, Long> im
             txn.commit();
         } catch (Exception e) {
             txn.rollback();
-            s_logger.error("Error updating UsageVPNUserVO:"+e.getMessage(), e);
+            logger.error("Error updating UsageVPNUserVO:"+e.getMessage(), e);
         } finally {
             txn.close();
         }
@@ -141,7 +139,7 @@ public class UsageVPNUserDaoImpl extends GenericDaoBase<UsageVPNUserVO, Long> im
             }
         } catch (Exception e) {
             txn.rollback();
-            s_logger.warn("Error getting usage records", e);
+            logger.warn("Error getting usage records", e);
         } finally {
             txn.close();
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/usage/dao/UsageVmDiskDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageVmDiskDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageVmDiskDaoImpl.java
index 4491c67..7daaf0f 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageVmDiskDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageVmDiskDaoImpl.java
@@ -24,7 +24,6 @@ import java.util.Map;
 
 import javax.ejb.Local;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.usage.UsageVmDiskVO;
@@ -35,7 +34,6 @@ import com.cloud.utils.exception.CloudRuntimeException;
 @Component
 @Local(value = {UsageVmDiskDao.class})
 public class UsageVmDiskDaoImpl extends GenericDaoBase<UsageVmDiskVO, Long> implements UsageVmDiskDao {
-    private static final Logger s_logger = Logger.getLogger(UsageVmDiskDaoImpl.class.getName());
     private static final String SELECT_LATEST_STATS =
         "SELECT uvd.account_id, uvd.zone_id, uvd.vm_id, uvd.volume_id, uvd.io_read, uvd.io_write, uvd.agg_io_read, uvd.agg_io_write, "
             + "uvd.bytes_read, uvd.bytes_write, uvd.agg_bytes_read, uvd.agg_bytes_write, uvd.event_time_millis "
@@ -83,7 +81,7 @@ public class UsageVmDiskDaoImpl extends GenericDaoBase<UsageVmDiskVO, Long> impl
             }
             return returnMap;
         } catch (Exception ex) {
-            s_logger.error("error getting recent usage disk stats", ex);
+            logger.error("error getting recent usage disk stats", ex);
         } finally {
             txn.close();
         }
@@ -103,7 +101,7 @@ public class UsageVmDiskDaoImpl extends GenericDaoBase<UsageVmDiskVO, Long> impl
             txn.commit();
         } catch (Exception ex) {
             txn.rollback();
-            s_logger.error("error deleting old usage disk stats", ex);
+            logger.error("error deleting old usage disk stats", ex);
         }
     }
 
@@ -135,7 +133,7 @@ public class UsageVmDiskDaoImpl extends GenericDaoBase<UsageVmDiskVO, Long> impl
             txn.commit();
         } catch (Exception ex) {
             txn.rollback();
-            s_logger.error("error saving usage_vm_disk to cloud_usage db", ex);
+            logger.error("error saving usage_vm_disk to cloud_usage db", ex);
             throw new CloudRuntimeException(ex.getMessage());
         }
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/usage/dao/UsageVolumeDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageVolumeDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageVolumeDaoImpl.java
index 7ef4222..96f1e48 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageVolumeDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageVolumeDaoImpl.java
@@ -27,7 +27,6 @@ import java.util.TimeZone;
 import javax.ejb.Local;
 
 import com.cloud.exception.CloudException;
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.usage.UsageVolumeVO;
@@ -38,7 +37,6 @@ import com.cloud.utils.db.TransactionLegacy;
 @Component
 @Local(value = {UsageVolumeDao.class})
 public class UsageVolumeDaoImpl extends GenericDaoBase<UsageVolumeVO, Long> implements UsageVolumeDao {
-    public static final Logger s_logger = Logger.getLogger(UsageVolumeDaoImpl.class.getName());
 
     protected static final String REMOVE_BY_USERID_VOLID = "DELETE FROM usage_volume WHERE account_id = ? AND id = ?";
     protected static final String UPDATE_DELETED = "UPDATE usage_volume SET deleted = ? WHERE account_id = ? AND id = ? and deleted IS NULL";
@@ -71,7 +69,7 @@ public class UsageVolumeDaoImpl extends GenericDaoBase<UsageVolumeVO, Long> impl
             txn.commit();
         } catch (Exception e) {
             txn.rollback();
-            s_logger.warn("Error removing usageVolumeVO:"+e.getMessage(), e);
+            logger.warn("Error removing usageVolumeVO:"+e.getMessage(), e);
         } finally {
             txn.close();
         }
@@ -93,7 +91,7 @@ public class UsageVolumeDaoImpl extends GenericDaoBase<UsageVolumeVO, Long> impl
             txn.commit();
         } catch (Exception e) {
             txn.rollback();
-            s_logger.warn("Error updating UsageVolumeVO", e);
+            logger.warn("Error updating UsageVolumeVO", e);
         } finally {
             txn.close();
         }
@@ -171,7 +169,7 @@ public class UsageVolumeDaoImpl extends GenericDaoBase<UsageVolumeVO, Long> impl
             }
         } catch (Exception e) {
             txn.rollback();
-            s_logger.warn("Error getting usage records", e);
+            logger.warn("Error getting usage records", e);
         } finally {
             txn.close();
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/user/dao/AccountDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/user/dao/AccountDaoImpl.java b/engine/schema/src/com/cloud/user/dao/AccountDaoImpl.java
index 9ae279f..e99cfc0 100644
--- a/engine/schema/src/com/cloud/user/dao/AccountDaoImpl.java
+++ b/engine/schema/src/com/cloud/user/dao/AccountDaoImpl.java
@@ -23,7 +23,6 @@ import java.util.List;
 
 import javax.ejb.Local;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.user.Account;
@@ -44,7 +43,6 @@ import com.cloud.utils.db.TransactionLegacy;
 @Component
 @Local(value = {AccountDao.class})
 public class AccountDaoImpl extends GenericDaoBase<AccountVO, Long> implements AccountDao {
-    private static final Logger s_logger = Logger.getLogger(AccountDaoImpl.class);
     private static final String FIND_USER_ACCOUNT_BY_API_KEY = "SELECT u.id, u.username, u.account_id, u.secret_key, u.state, "
         + "a.id, a.account_name, a.type, a.domain_id, a.state " + "FROM `cloud`.`user` u, `cloud`.`account` a "
         + "WHERE u.account_id = a.id AND u.api_key = ? and u.removed IS NULL";
@@ -148,7 +146,7 @@ public class AccountDaoImpl extends GenericDaoBase<AccountVO, Long> implements A
                 userAcctPair = new Pair<User, Account>(u, a);
             }
         } catch (Exception e) {
-            s_logger.warn("Exception finding user/acct by api key: " + apiKey, e);
+            logger.warn("Exception finding user/acct by api key: " + apiKey, e);
         }
         return userAcctPair;
     }
@@ -266,7 +264,7 @@ public class AccountDaoImpl extends GenericDaoBase<AccountVO, Long> implements A
         if (!account.getNeedsCleanup()) {
             account.setNeedsCleanup(true);
             if (!update(accountId, account)) {
-                s_logger.warn("Failed to mark account id=" + accountId + " for cleanup");
+                logger.warn("Failed to mark account id=" + accountId + " for cleanup");
             }
         }
     }
@@ -286,7 +284,7 @@ public class AccountDaoImpl extends GenericDaoBase<AccountVO, Long> implements A
             domain_id = account_vo.getDomainId();
         }
         catch (Exception e) {
-            s_logger.warn("getDomainIdForGivenAccountId: Exception :" + e.getMessage());
+            logger.warn("getDomainIdForGivenAccountId: Exception :" + e.getMessage());
         }
         finally {
             return domain_id;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/engine/schema/src/com/cloud/user/dao/UserStatisticsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/user/dao/UserStatisticsDaoImpl.java b/engine/schema/src/com/cloud/user/dao/UserStatisticsDaoImpl.java
index 7a8e714..ceefb58 100644
--- a/engine/schema/src/com/cloud/user/dao/UserStatisticsDaoImpl.java
+++ b/engine/schema/src/com/cloud/user/dao/UserStatisticsDaoImpl.java
@@ -25,7 +25,6 @@ import java.util.TimeZone;
 
 import javax.ejb.Local;
 
-import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.user.UserStatisticsVO;
@@ -38,7 +37,6 @@ import com.cloud.utils.db.TransactionLegacy;
 @Component
 @Local(value = {UserStatisticsDao.class})
 public class UserStatisticsDaoImpl extends GenericDaoBase<UserStatisticsVO, Long> implements UserStatisticsDao {
-    private static final Logger s_logger = Logger.getLogger(UserStatisticsDaoImpl.class);
     private static final String ACTIVE_AND_RECENTLY_DELETED_SEARCH =
         "SELECT us.id, us.data_center_id, us.account_id, us.public_ip_address, us.device_id, us.device_type, us.network_id, us.agg_bytes_received, us.agg_bytes_sent "
             + "FROM user_statistics us, account a " + "WHERE us.account_id = a.id AND (a.removed IS NULL OR a.removed >= ?) " + "ORDER BY us.id";
@@ -111,7 +109,7 @@ public class UserStatisticsDaoImpl extends GenericDaoBase<UserStatisticsVO, Long
                 userStats.add(toEntityBean(rs, false));
             }
         } catch (Exception ex) {
-            s_logger.error("error saving user stats to cloud_usage db", ex);
+            logger.error("error saving user stats to cloud_usage db", ex);
         }
         return userStats;
     }
@@ -129,7 +127,7 @@ public class UserStatisticsDaoImpl extends GenericDaoBase<UserStatisticsVO, Long
                 userStats.add(toEntityBean(rs, false));
             }
         } catch (Exception ex) {
-            s_logger.error("error lisitng updated user stats", ex);
+            logger.error("error lisitng updated user stats", ex);
         }
         return userStats;
     }


Mime
View raw message