| 1130 | return '\t'.join(joined_fields) |
| 1131 | |
| 1132 | def _gather_outputs(self, field, log_fields, stat_parent, stat, require_dict=False): |
| 1133 | output = [] |
| 1134 | name = '' |
| 1135 | if isinstance(stat, dict): |
| 1136 | log_fields = stat.get(log_fields, []) |
| 1137 | name = stat.get('log_name', '.'.join(field)) |
| 1138 | for f in log_fields: |
| 1139 | output.append(f.format(**stat)) |
| 1140 | elif not require_dict: |
| 1141 | name = '.'.join(field) |
| 1142 | number_format = stat_parent.get('log_format', '') |
| 1143 | unit = stat_parent.get('log_unit', '') |
| 1144 | fmt = '{' + number_format + '}' + unit |
| 1145 | output.append(fmt.format(stat)) |
| 1146 | return name, output |
| 1147 | |
| 1148 | |
| 1149 | |