Skip to content

Commit 57ceeed

Browse files
committed
DNM lava_callback: improve logging
Signed-off-by: Arnaud Ferraris <[email protected]>
1 parent e03b59b commit 57ceeed

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lava_callback.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,14 @@ def async_job_submit(api_helper, node_id, job_callback):
215215
log_txt_url = _upload_log(log_parser, job_node, storage)
216216
if log_txt_url:
217217
job_node['artifacts']['lava_log'] = log_txt_url
218-
print(f"Log uploaded to {log_txt_url}")
218+
logging.info(f"Log uploaded to {log_txt_url}")
219219
else:
220-
print("Failed to upload log")
220+
logging.info("Failed to upload log")
221221
metrics.add('lava_callback_late_fail_total', 1)
222222
callback_json_url = _upload_callback_data(callback_data, job_node, storage)
223223
if callback_json_url:
224224
job_node['artifacts']['callback_data'] = callback_json_url
225-
print(f"Callback data uploaded to {callback_json_url}")
225+
logging.info(f"Callback data uploaded to {callback_json_url}")
226226
else:
227227
metrics.add('lava_callback_late_fail_total', 1)
228228
# failed LAVA job should have result set to 'incomplete'
@@ -238,10 +238,10 @@ def async_job_submit(api_helper, node_id, job_callback):
238238
if result.startswith("artifact-upload:"):
239239
artifact = result.split(':', 2)
240240
if len(artifact) != 3:
241-
print(f"Failed to extract artifact name and URL from {result}")
241+
logging.info(f"Failed to extract artifact name and URL from {result}")
242242
continue
243243
job_node['artifacts'][artifact[1]] = artifact[2]
244-
print(f"Artifact {artifact[1]} added with URL {artifact[2]}")
244+
logging.info(f"Artifact {artifact[1]} added with URL {artifact[2]}")
245245
hierarchy = job_callback.get_hierarchy(results, job_node)
246246
api_helper.submit_results(hierarchy, job_node)
247247

0 commit comments

Comments
 (0)