Log when dumping to file (instead of print)
This commit is contained in:
parent
61f8ce5c0e
commit
fab7663ab3
@ -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):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user