Commit d3e6fe2a authored by Federico Sismondi's avatar Federico Sismondi
Browse files

Add log on success FS dump with filename

parent ba0a4ce0
......@@ -382,6 +382,7 @@ def _dump_raw_data_to_filesystem():
app.logger.info('dumping request to FS')
try:
filepath = os.path.join(COLLECTION_DIR, '{}.json'.format(int(time.time())))
with open(filepath, encoding='utf-8', mode='w') as f:
json.dump(
obj=request.json,
......@@ -392,6 +393,7 @@ def _dump_raw_data_to_filesystem():
app.logger.error(e)
return 'error'
app.logger.info("Dumped raw data at file {}".format(filepath))
return 'ok'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment