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.

Remove duplicate research logs method - logs already visible in UI

LearningCircuit1bfeff241e28
diff --git a/src/local_deep_research/error_handling/report_generator.py b/src/local_deep_research/error_handling/report_generator.py
index b1b6d47921..fb75b69d35 100644
--- a/src/local_deep_research/error_handling/report_generator.py
+++ b/src/local_deep_research/error_handling/report_generator.py
@@ -194,82 +194,6 @@ class ErrorReportGenerator:
return "\n".join(context_parts) if context_parts else ""
- def _get_research_logs(self, research_id: int) -> Optional[str]:
- """
- Fetch logs from the database for this specific research run
-
- Args:
- research_id: The research ID to fetch logs for
-
- Returns:
- str: Formatted logs or None if no logs found
- """
- try:
- # Import here to avoid circular imports
- from local_deep_research.web.database.models import ResearchLog
- from local_deep_research.web.database.database import get_db_session
-
- with get_db_session() as session:
- # Get all logs for this research, ordered by timestamp
- logs = session.query(ResearchLog).filter(
- ResearchLog.research_id == research_id
- ).order_by(ResearchLog.timestamp.asc()).all()
-
- if not logs:
- return None
-
- # Format logs for display
- log_parts = []
- error_logs = []
- warning_logs = []
- info_logs = []
-
- for log in logs:
- timestamp = log.timestamp.strftime('%H:%M:%S')
- location = f"{log.module}:{log.function}:{log.line_no}"
-
- # Categorize logs
- if log.level in ['ERROR', 'CRITICAL']:
- error_logs.append(f"**{timestamp}** `{log.level}` [{location}]\n```\n{log.message}\n```")
- elif log.level == 'WARNING':
- warning_logs.append(f"**{timestamp}** `{log.level}` [{location}] {log.message}")
- elif log.level in ['INFO', 'MILESTONE']:
- info_logs.append(f"**{timestamp}** `{log.level}` {log.message}")
-
- # Show errors first (most important)
- if error_logs:
- log_parts.append("### 🚨 Errors and Exceptions\n")
- log_parts.extend(error_logs[:5]) # Show last 5 errors
- if len(error_logs) > 5:
- log_parts.append(f"\n*({len(error_logs) - 5} more errors - see full logs panel)*")
- log_parts.append("")
-
- # Then warnings
- if warning_logs:
- log_parts.append("### ⚠️ Warnings\n")
- log_parts.extend(warning_logs[-3:]) # Show last 3 warnings
- if len(warning_logs) > 3:
- log_parts.append(f"\n*({len(warning_logs) - 3} more warnings - see full logs panel)*")
- log_parts.append("")
-
- # Finally recent activity (info logs)
- if info_logs:
- log_parts.append("### ℹ️ Recent Activity\n")
- log_parts.extend(info_logs[-5:]) # Show last 5 info logs
- if len(info_logs) > 5:
- log_parts.append(f"\n*({len(info_logs) - 5} more info logs - see full logs panel)*")
-
- # Add summary
- total_logs = len(logs)
- log_parts.append(f"\n**Total logs for this research:** {total_logs}")
- log_parts.append(f"**Errors:** {len(error_logs)} | **Warnings:** {len(warning_logs)} | **Info:** {len(info_logs)}")
-
- return "\n".join(log_parts) if log_parts else None
-
- except Exception as e:
- logger.warning(f"Could not fetch research logs for ID {research_id}: {e}")
- return f"*Could not fetch logs from database: {str(e)}*"
-
def generate_quick_error_summary(self, error_message: str) -> Dict[str, str]:
"""
Generate a quick error summary for API responses