Log when dumping to file (instead of print)

This commit is contained in:
Matthias 2018-12-28 10:46:48 +01:00
parent 61f8ce5c0e
commit fab7663ab3
1 changed files with 3 additions and 1 deletions

View File

@ -71,7 +71,7 @@ def file_dump_json(filename, data, is_zip=False) -> None:
:param data: JSON Data to save
:return:
"""
print(f'dumping json to "{filename}"')
logger.info(f'dumping json to "{filename}"')
if is_zip:
if not filename.endswith('.gz'):
@ -82,6 +82,8 @@ def file_dump_json(filename, data, is_zip=False) -> None:
with open(filename, 'w') as fp:
rapidjson.dump(data, fp, default=str, number_mode=rapidjson.NM_NATIVE)
logger.debug(f'done json to "{filename}"')
def json_load(datafile):
"""