Skip to content

Commit 58f1fb6

Browse files
author
seolmin
committed
fix: add debug code when converting cost data
Signed-off-by: seolmin <seolmin@megazone.com>
1 parent dc695fb commit 58f1fb6

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/cloudforet/cost_analysis/manager/cost_manager.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,9 @@ def _convert_cost_and_usage_quantity_types(result):
141141
result['cost'] = float(result['cost'])
142142
result['usage_quantity'] = float(result.get('usage_quantity', 0))
143143
except Exception as e:
144-
_LOGGER.debug(f'[_convert_cost_and_usage_quantity_types] convert cost and usage quantity types error: {e}',
145-
exc_info=True)
144+
_LOGGER.error(
145+
f'[_convert_cost_and_usage_quantity_types] convert cost and usage quantity types error: {e} (data={result})',
146+
exc_info=True)
146147
return False
147148
return True
148149

@@ -151,7 +152,7 @@ def _exist_cost_and_usage_quantity(result):
151152
if result['cost'] and result.get('usage_quantity'):
152153
return True
153154
else:
154-
_LOGGER.debug(f'[_exist_cost_and_usage_quantity] cost or usage quantity are empty: {result}')
155+
_LOGGER.error(f'[_exist_cost_and_usage_quantity] cost or usage quantity are empty: {result}')
155156
return False
156157

157158
@staticmethod

0 commit comments

Comments
 (0)