Default Behavior
By default, typemux-cc writes logs to stderr only:Enabling File Logging
Method 1: Environment Variable (Quick)
SetTYPEMUX_CC_LOG_FILE to enable both stderr and file output:
When
TYPEMUX_CC_LOG_FILE is set, logs are written to both stderr AND the file. This allows real-time monitoring while preserving a persistent record.Method 2: Config File (Persistent)
For persistent logging across Claude Code restarts:Log Levels
Control log verbosity with theRUST_LOG environment variable:
string
default:"typemux_cc=debug"
What Each Level Shows
info - High-Level Events
debug - Default Level
Includes everything from info plus:
trace - Deep Debugging
Includes everything from debug plus:
Real-Time Monitoring
Monitor logs in real-time usingtail:
Useful Log Queries
Grep patterns for common debugging scenarios:Monitor Backend Pool Activity
Track Warmup Transitions
Warming -> Readyindicates successful index build- Long warmup times may indicate large codebases
- Queued request counts show how many requests waited
View Document Restoration
Find Session Transitions
Debug .venv Detection Issues
venv_path=Nonein logs → file opened before.venvwas created- No search logs → document using cached venv from previous open
Filter by Time Range (with timestamps)
If your logs include timestamps, filter by time:Log Rotation
typemux-cc uses
Rotation::NEVER - logs are appended to the same file indefinitely.Interpreting Common Log Messages
Backend Spawn Events
.venv.
Warmup State
LRU Eviction
TTL Eviction
TYPEMUX_CC_BACKEND_TTL (default 30 minutes).
Venv Search
.venv by traversing parent directories.
Document Restoration
Troubleshooting with Logs
Issue: LSP not responding
Check logs for:- Backend binary not found in PATH
- Backend crashed during initialization
- Permission issues with
.venvdirectory
Issue: Wrong completions/types
Check for:venv_path=None→ No.venvdetected (strict venv mode)- Wrong venv path → Document using cached venv from first open
- Multiple venv paths for same file → Cache invalidation issues
Issue: Slow response after file open
Check warmup times:- Increasing
TYPEMUX_CC_WARMUP_TIMEOUTif timeout expires prematurely - Keeping
TYPEMUX_CC_BACKEND_TTLhigh to avoid frequent re-initialization
Log Output Format
Logs include these fields (frommain.rs:64-75):
- Timestamp (implicit)
- Level:
INFO,DEBUG,TRACE,WARN,ERROR - Target: Rust module path (e.g.,
typemux_cc::proxy) - Thread ID: For concurrent debugging
- Message: Human-readable event description
- Structured fields:
venv=,session=,method=, etc.
Performance Considerations
impact
Related Pages
- Environment Variables - Complete env var reference
- Config File - Persistent logging configuration