Skip to main content
By default, Chonkie logs warnings and errors. You can control what gets logged using the CHONKIE_LOG environment variable or configure it programmatically.

Quick Setup

Set the CHONKIE_LOG environment variable before importing chonkie:
export CHONKIE_LOG=debug  # Show everything
export CHONKIE_LOG=info   # Show info, warnings, and errors
export CHONKIE_LOG=warning # Show warnings and errors (default)
export CHONKIE_LOG=error  # Show only errors
export CHONKIE_LOG=off    # Disable all logging

Programmatic Configuration

Configure logging from your Python code:
import chonkie

# Enable debug logging
chonkie.logger.configure("debug")

# Disable logging completely
chonkie.logger.configure("off")

# Back to warnings and errors
chonkie.logger.configure("warning")

Log Levels

  • debug - Everything (chunker initialization, text processing, chunk counts)
  • info - High-level operations (chunk creation, file operations)
  • warning - Potential issues (default)
  • error - Only errors
  • off - Silent

Custom Format

Change the log format to suit your needs:
  • Default
  • Simple
  • Minimal
  • Detailed
import chonkie
chonkie.logger.configure("info")
Output:
2025-11-13 14:18:58,714 | INFO | chonkie.chunker.token:chunk:143 - Created 5 chunks
That’s it. Logging is simple and stays out of your way.