Total Complexity | 3 |
Total Lines | 11 |
Duplicated Lines | 0 % |
1 | # -*- coding: utf-8 -*- |
||
16 | class LogWriter(plumd.plugins.Writer): |
||
17 | """Simply logs all metrics received.""" |
||
18 | |||
19 | def push(self, rset): |
||
20 | """Simply logs the metrics.""" |
||
21 | # ( time, result_name, result_meta, [metric, metric, metric] ) |
||
22 | for (ts, rname, rmeta, metrics) in rset.results: |
||
23 | for metric in metrics: |
||
24 | msg = "test: received: measurement: {0}, time: {1}, name:{2}, value: {3}, meta: {4}" |
||
25 | self.log.debug(msg.format(rname, ts, metric.name, metric.value, |
||
26 | rmeta)) |
||
27 |