Skip to content

📝 Logging & Error Handling

Robust Error Management

Comprehensive logging and error recovery

🔧 Configuration

from llm_evaluation_framework.utils.logger import setup_logging

logger = setup_logging(
    level="DEBUG",
    log_file="evaluation.log",
    log_to_console=True
)

🛡️ Error Handling

from llm_evaluation_framework.utils.error_handler import retry_with_backoff

@retry_with_backoff(max_retries=3)
def evaluate_with_retry():
    return engine.evaluate_model(model_name, test_cases, use_case)

📊 Log Levels

  • DEBUG: Detailed information
  • INFO: General information
  • WARNING: Warning messages
  • ERROR: Error messages
  • CRITICAL: Critical failures

View Best Practices