Adding debug logs for lock creation
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/d1f6cb52 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/d1f6cb52 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/d1f6cb52 Branch: refs/heads/master Commit: d1f6cb5284030fbb9c0731ec96521cef73ccd97f Parents: 82e50a8 Author: reka <[email protected]> Authored: Wed Jun 24 15:28:45 2015 +0530 Committer: reka <[email protected]> Committed: Wed Jun 24 15:34:26 2015 +0530 ---------------------------------------------------------------------- .../domain/application/locking/ApplicationLockHierarchy.java | 5 ++--- .../domain/topology/locking/TopologyLockHierarchy.java | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/d1f6cb52/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/application/locking/ApplicationLockHierarchy.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/application/locking/ApplicationLockHierarchy.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/application/locking/ApplicationLockHierarchy.java index e45d87f..6d934aa 100644 --- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/application/locking/ApplicationLockHierarchy.java +++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/application/locking/ApplicationLockHierarchy.java @@ -61,9 +61,8 @@ public class ApplicationLockHierarchy { if (applicationLock == null) { applicationLock = new ApplicationLock(); - if (log.isInfoEnabled()) { - log.info("Lock created for application: [application-id] " + appId + - " " + applicationLock.toString() + " size of application lock in map : " + appIdToApplicationLockMap.size()); + if (log.isDebugEnabled()) { + log.debug("Lock created for application: [application-id] " + appId); } appIdToApplicationLockMap.put(appId, applicationLock); } http://git-wip-us.apache.org/repos/asf/stratos/blob/d1f6cb52/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/locking/TopologyLockHierarchy.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/locking/TopologyLockHierarchy.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/locking/TopologyLockHierarchy.java index 8911ebc..8cfdd83 100644 --- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/locking/TopologyLockHierarchy.java +++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/locking/TopologyLockHierarchy.java @@ -65,6 +65,9 @@ public class TopologyLockHierarchy { TopologyLock topologyLock = serviceNameToTopologyLockMap.get(serviceName); if (topologyLock == null && forceCreationIfNotFound) { topologyLock = new TopologyLock(); + if (log.isDebugEnabled()) { + log.debug("Lock created for topology service: [service-id] " + serviceName); + } serviceNameToTopologyLockMap.put(serviceName, topologyLock); } @@ -75,6 +78,9 @@ public class TopologyLockHierarchy { TopologyLock topologyLock = clusterIdToTopologyLockMap.get(clusterId); if (topologyLock == null && forceCreationIfNotFound) { topologyLock = new TopologyLock(); + if (log.isDebugEnabled()) { + log.debug("Lock created for topology cluster: [cluster-id] " + clusterId); + } clusterIdToTopologyLockMap.put(clusterId, topologyLock); } return topologyLock;
