You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by im...@apache.org on 2014/10/27 15:16:10 UTC
[06/50] [abbrv] git commit: Cleaned additional log points
Cleaned additional log points
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/3423127e
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/3423127e
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/3423127e
Branch: refs/heads/master
Commit: 3423127e17fe94cbf1318d37ccc06dc526111e39
Parents: 33a1f2b
Author: Chamila de Alwis <ch...@wso2.com>
Authored: Thu Oct 16 15:36:57 2014 +0530
Committer: Chamila de Alwis <ch...@wso2.com>
Committed: Thu Oct 16 15:36:57 2014 +0530
----------------------------------------------------------------------
.../cartridge-agent/modules/databridge/agent.py | 12 +-----------
.../modules/healthstatspublisher/healthstats.py | 8 --------
2 files changed, 1 insertion(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/3423127e/tools/python-cartridge-agent/cartridge-agent/modules/databridge/agent.py
----------------------------------------------------------------------
diff --git a/tools/python-cartridge-agent/cartridge-agent/modules/databridge/agent.py b/tools/python-cartridge-agent/cartridge-agent/modules/databridge/agent.py
index 8146666..1859d8a 100644
--- a/tools/python-cartridge-agent/cartridge-agent/modules/databridge/agent.py
+++ b/tools/python-cartridge-agent/cartridge-agent/modules/databridge/agent.py
@@ -137,11 +137,8 @@ class ThriftPublisher:
raise RuntimeError("Port number for Thrift Publisher is invalid: %r" % port)
self.__publisher = Publisher(ip, port_number)
- ThriftPublisher.log.debug("CREATED PUBLISHER.. CONNECTING WITH USERNAME AND PASSWORD %r:%r" % (username, password))
self.__publisher.connect(username, password)
- ThriftPublisher.log.debug("Connected THRIFT ")
self.__publisher.defineStream(str(stream_definition))
- ThriftPublisher.log.debug("DEFINED STREAM to %r:%r with stream definition %r" % (ip, port, str(stream_definition)))
self.stream_definition = stream_definition
self.stream_id = self.__publisher.streamId
@@ -161,10 +158,9 @@ class ThriftPublisher:
ThriftPublisher.assign_attributes(event.metaData, event_bundler)
ThriftPublisher.assign_attributes(event.correlationData, event_bundler)
ThriftPublisher.assign_attributes(event.payloadData, event_bundler)
- ThriftPublisher.log.debug("ABOUT TO PUBLISH")
self.__publisher.publish(event_bundler)
- ThriftPublisher.log.debug("PUBLISHED EVENT BUNDLED TO THRIFT MODULE")
+ self.log.debug("Published event to thrift stream [%r]" % self.stream_id)
def disconnect(self):
"""
@@ -172,7 +168,6 @@ class ThriftPublisher:
:return: void
"""
self.__publisher.disconnect()
- ThriftPublisher.log.debug("DISCONNECTED FROM THRIFT PUBLISHER")
@staticmethod
def assign_attributes(attributes, event_bundler):
@@ -192,19 +187,14 @@ class ThriftPublisher:
if attributes is not None and len(attributes) > 0:
for attrib in attributes:
if isinstance(attrib, int):
- ThriftPublisher.log.debug("Int : %r" % attrib)
event_bundler.addIntAttribute(attrib)
elif isinstance(attrib, long):
- ThriftPublisher.log.debug("Long : %r" % attrib)
event_bundler.addLongAttribute(attrib)
elif isinstance(attrib, float):
- ThriftPublisher.log.debug("Float : %r" % attrib)
event_bundler.addDoubleAttribute(attrib)
elif isinstance(attrib, bool):
- ThriftPublisher.log.debug("Bool : %r" % attrib)
event_bundler.addBoolAttribute(attrib)
elif isinstance(attrib, str):
- ThriftPublisher.log.debug("Str : %r" % attrib)
event_bundler.addStringAttribute(attrib)
else:
ThriftPublisher.log.error("Undefined attribute type: %r" % attrib)
http://git-wip-us.apache.org/repos/asf/stratos/blob/3423127e/tools/python-cartridge-agent/cartridge-agent/modules/healthstatspublisher/healthstats.py
----------------------------------------------------------------------
diff --git a/tools/python-cartridge-agent/cartridge-agent/modules/healthstatspublisher/healthstats.py b/tools/python-cartridge-agent/cartridge-agent/modules/healthstatspublisher/healthstats.py
index 5dcad24..4ceb948 100644
--- a/tools/python-cartridge-agent/cartridge-agent/modules/healthstatspublisher/healthstats.py
+++ b/tools/python-cartridge-agent/cartridge-agent/modules/healthstatspublisher/healthstats.py
@@ -49,8 +49,6 @@ class HealthStatisticsPublisherManager(Thread):
self.publish_interval = publish_interval
""":type : int"""
- self.log.debug("Initializing health stat publisher manager with interval %r" % publish_interval)
-
self.terminated = False
self.publisher = HealthStatisticsPublisher()
@@ -60,8 +58,6 @@ class HealthStatisticsPublisherManager(Thread):
""":type : AbstractHealthStatisticsReader"""
def run(self):
- self.log.debug("Pubilsher manager thread started")
-
while not self.terminated:
time.sleep(self.publish_interval)
@@ -112,7 +108,6 @@ class HealthStatisticsPublisher:
"""
Create a StreamDefinition for publishing to CEP
"""
- HealthStatisticsPublisher.log.debug("Creating Stream Definition for CEP publisher")
stream_def = StreamDefinition()
stream_def.name = HealthStatisticsPublisherManager.STREAM_NAME
stream_def.version = HealthStatisticsPublisherManager.STREAM_VERSION
@@ -126,8 +121,6 @@ class HealthStatisticsPublisher:
stream_def.add_payloaddata_attribute("health_description", StreamDefinition.STRING)
stream_def.add_payloaddata_attribute("value", StreamDefinition.DOUBLE)
- HealthStatisticsPublisher.log.debug("Created stream definition : %r" % str(stream_def))
-
return stream_def
def publish_memory_usage(self, memory_usage):
@@ -172,7 +165,6 @@ class DefaultHealthStatisticsReader(AbstractHealthStatisticsReader):
def __init__(self):
self.log = LogFactory().get_log(__name__)
- self.log.debug("Stats reader initialized")
def stat_cartridge_health(self):
cartridge_stats = CartridgeHealthStatistics()