Features: - Vector search with Pinecone + Vertex AI embeddings - Document relationships (link, unlink, related, graph) - Auto-link with LLM analysis - Intelligent merge with Gemini Modular structure: - clients/: Pinecone, Vertex AI - tools/: core, relations, stats - utils/: validation, logging Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
31 lines
702 B
Python
31 lines
702 B
Python
"""Logging configuration for RAG system."""
|
|
import logging
|
|
import sys
|
|
|
|
def setup_logging(level: str = "INFO") -> None:
|
|
"""
|
|
Setup logging configuration.
|
|
|
|
Args:
|
|
level: Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
|
|
"""
|
|
logging.basicConfig(
|
|
level=getattr(logging, level.upper(), logging.INFO),
|
|
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
|
|
handlers=[
|
|
logging.StreamHandler(sys.stdout)
|
|
]
|
|
)
|
|
|
|
def get_logger(name: str) -> logging.Logger:
|
|
"""
|
|
Get logger instance.
|
|
|
|
Args:
|
|
name: Logger name (usually __name__)
|
|
|
|
Returns:
|
|
Logger instance
|
|
"""
|
|
return logging.getLogger(name)
|