Skip to content

Logging Setup

Write Logs to a File

Useful in production or scheduled jobs where you want a persistent audit trail.

logging:
  level: "INFO"
  colored: false
  console_output: true
  log_file: "logs/rag.log"

Or in code:

from ragwire import setup_logging

logger = setup_logging(log_level="INFO", log_file="logs/rag.log")

Colored Output for Development

from ragwire import setup_colored_logging

logger = setup_colored_logging(log_level="DEBUG")

Or via config:

logging:
  level: "DEBUG"
  colored: true

Log Levels

Level Use When
DEBUG Development — shows every step (loading, chunking, embedding, storing)
INFO Production — shows ingestion stats, retrieval queries, warnings
WARNING Minimal — only problems and skipped files
ERROR Errors only