Add colored logs (#14036)

This commit is contained in:
Talmaj
2026-05-25 10:00:55 +08:00
committed by GitHub
parent b30e980a20
commit 63bcaec5d1
2 changed files with 40 additions and 4 deletions
+2 -2
View File
@@ -344,9 +344,9 @@ def prompt_worker(q, server_instance):
# Log Time in a more readable way after 10 minutes
if execution_time > 600:
execution_time = time.strftime("%H:%M:%S", time.gmtime(execution_time))
logging.info(f"Prompt executed in {execution_time}")
logging.info(f"Prompt executed in {execution_time}", extra={'color': 'green'})
else:
logging.info("Prompt executed in {:.2f} seconds".format(execution_time))
logging.info("Prompt executed in {:.2f} seconds".format(execution_time), extra={'color': 'green'})
if not asset_seeder.is_disabled():
paths = _collect_output_absolute_paths(e.history_result)