Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

refactor: replace print() with logger in non-CLI code (#1992)

LearningCircuit4cd64891820c
diff --git a/src/local_deep_research/web/routes/history_routes.py b/src/local_deep_research/web/routes/history_routes.py
index 01eb1d9812..a7dbfe2d62 100644
--- a/src/local_deep_research/web/routes/history_routes.py
+++ b/src/local_deep_research/web/routes/history_routes.py
@@ -1,5 +1,4 @@
import json
-import traceback
from flask import Blueprint, jsonify, make_response, session
from loguru import logger
@@ -120,8 +119,9 @@ def get_history():
item["duration_seconds"] = int(
(end_time - start_time).total_seconds()
)
- except Exception as e:
- print(f"Error recalculating duration: {e!s}")
+ except Exception:
+ logger.warning("Error recalculating duration")
+ logger.debug("Duration error details", exc_info=True)
history.append(item)
@@ -141,9 +141,8 @@ def get_history():
"Access-Control-Allow-Methods", "GET,PUT,POST,DELETE,OPTIONS"
)
return response
- except Exception as e:
- print(f"Error getting history: {e!s}")
- print(traceback.format_exc())
+ except Exception:
+ logger.exception("Error getting history")
# Return empty array with CORS headers
response = make_response(
jsonify(