diff options
author | 2016-12-01 00:56:37 +0000 | |
---|---|---|
committer | 2016-12-01 00:56:37 +0000 | |
commit | e12bcf0b3acdff1b483e0a7705c77acdee394c06 (patch) | |
tree | 25537d81994d32de0bc362a5803ce6bfaf1199f0 /yardstick/dispatcher | |
parent | 35c360e3e41c8e736604a434781a178a8a34204a (diff) | |
parent | 4630e877d70ba453ac0d88e226a66a6f1efc7608 (diff) |
Merge "switch logging to proper usage"
Diffstat (limited to 'yardstick/dispatcher')
-rw-r--r-- | yardstick/dispatcher/http.py | 4 | ||||
-rw-r--r-- | yardstick/dispatcher/influxdb.py | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/yardstick/dispatcher/http.py b/yardstick/dispatcher/http.py index 2298d00cc..98e772dd8 100644 --- a/yardstick/dispatcher/http.py +++ b/yardstick/dispatcher/http.py @@ -81,14 +81,14 @@ class HttpDispatcher(DispatchBase): case_name = v["scenario_cfg"]["tc"] break if case_name == "": - LOG.error('Test result : %s' % json.dumps(self.result)) + LOG.error('Test result : %s', json.dumps(self.result)) LOG.error('The case_name cannot be found, no data will be posted.') return self.result["case_name"] = case_name try: - LOG.debug('Test result : %s' % json.dumps(self.result)) + LOG.debug('Test result : %s', json.dumps(self.result)) res = requests.post(self.target, data=json.dumps(self.result), headers=self.headers, diff --git a/yardstick/dispatcher/influxdb.py b/yardstick/dispatcher/influxdb.py index 8673253b4..fc9f3e932 100644 --- a/yardstick/dispatcher/influxdb.py +++ b/yardstick/dispatcher/influxdb.py @@ -127,7 +127,7 @@ class InfluxdbDispatcher(DispatchBase): return make_lines(msg).encode('utf-8') def record_result_data(self, data): - LOG.debug('Test result : %s' % json.dumps(data)) + LOG.debug('Test result : %s', json.dumps(data)) self.raw_result.append(data) if self.target == '': # if the target was not set, do not do anything @@ -148,13 +148,13 @@ class InfluxdbDispatcher(DispatchBase): return 0 if self.tc == "": - LOG.error('Test result : %s' % json.dumps(data)) + LOG.error('Test result : %s', json.dumps(data)) LOG.error('The case_name cannot be found, no data will be posted.') return -1 try: line = self._data_to_line_protocol(data) - LOG.debug('Test result line format : %s' % line) + LOG.debug('Test result line format : %s', line) res = requests.post(self.influxdb_url, data=line, auth=(self.username, self.password), @@ -171,5 +171,5 @@ class InfluxdbDispatcher(DispatchBase): return 0 def flush_result_data(self): - LOG.debug('Test result all : %s' % json.dumps(self.raw_result)) + LOG.debug('Test result all : %s', json.dumps(self.raw_result)) return 0 |