Harden logging config with safer overrides and optional JSON/file sinks

This commit is contained in:
ي
2026-03-11 16:31:28 +05:30
parent b410ece4ca
commit 7619604324
6 changed files with 287 additions and 124 deletions

View File

@@ -76,7 +76,6 @@ else:
load_dotenv()
print(f"No .env found at {env_path}, using current directory")
from loguru import logger
from utils.logger_utils import get_service_logger
# Use service-specific logger to avoid conflicts
@@ -93,10 +92,6 @@ import re
from typing import Optional, Dict, Any
# Configure standard logging
import logging
logging.basicConfig(level=logging.INFO, format='[%(asctime)s-%(levelname)s-%(module)s-%(lineno)d]- %(message)s')
logger = logging.getLogger(__name__)
def get_gemini_api_key() -> str:
"""Get Gemini API key with proper error handling."""