Logging
Chess-tui includes a configurable logging system that can help with debugging and understanding the application's behavior.
Configuration
Logging can be configured in the ~/.config/chess-tui/config.toml file. The log level can be set using the log_level option:
log_level = "INFO" # Default is "OFF"
Available Log Levels
OFF- Logging disabled (default)ERROR- Only error messagesWARN- Warning and error messagesINFO- Informational messages, warnings, and errorsDEBUG- Detailed debug information plus all aboveTRACE- Most detailed logging level
Log Files
When logging is enabled, log files are stored in:
~/.config/chess-tui/logs/
Each log file is named with a timestamp:
chess-tui_YYYY-MM-DD_HH-MM-SS.log
For example: chess-tui_2024-03-20_15-30-45.log
Usage
Logs can be helpful when:
- Debugging multiplayer connection issues
- Understanding game state changes
- Investigating unexpected behavior
- Developing new features
tip
For normal gameplay, you can leave logging set to OFF. Enable logging only when you need to troubleshoot issues or want to understand the application's behavior in detail.