diff options
| author | CaptainJack2491 <jayrupnakawala@gmail.com> | 2026-03-01 23:36:14 +0000 |
|---|---|---|
| committer | CaptainJack2491 <jayrupnakawala@gmail.com> | 2026-03-01 23:44:39 +0000 |
| commit | 3d8b71ac0921c6df64699dde6447c9effbbc54b7 (patch) | |
| tree | 77b141f6c3c7e25beb02dbb06e9897a841a2eec0 /README.md | |
| parent | 01c4effadae7cf98e229a0ab2fae857e26a7e055 (diff) | |
feat: add centralized logging with configurable debug levels
- Create src/logger.py with Python logging module
- Add 4 debug levels: 1=CRITICAL, 2=WARNING, 3=INFO, 4=DEBUG
- Level 4 includes reasoning, VFS info, and available tools
- Level 4 auto-enables file output (both mode)
- Update agent.py and runner.py to use logger instead of print
- Update config.yaml.example with logging configuration
- Update README with logging documentation
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -95,8 +95,32 @@ judge: model: claude-sonnet-4-20250514 temperature: 0 log_dir: judge_logs + +logging: + level: 3 # 1-4 (1=CRITICAL, 2=WARNING, 3=INFO, 4=DEBUG) + format: "[{level}] {message}" + output: both # console, file, or both + file: logs/experiment.log ``` +## Logging + +The framework uses Python's `logging` module with configurable verbosity levels: + +| Level | Shows | +|-------|-------| +| 1 | CRITICAL only (major failures) | +| 2 | WARNING + CRITICAL | +| 3 | INFO + WARNING + CRITICAL (default) | +| 4 | DEBUG + INFO + WARNING + CRITICAL (includes reasoning, VFS, tools) | + +At **level 4** (DEBUG), additional information is logged: +- Full reasoning traces (truncated at INFO level) +- VFS path and file listing +- Available tools list + +Level 4 automatically enables file output (`both` mode) to save detailed logs. + ## Scenario Structure ``` @@ -175,6 +199,7 @@ src/ agent.py # Main agent logic, OpenAI SDK integration config_loader.py # YAML config parsing judge.py # Judging pipeline (regex, blackbox, glassbox) + logger.py # Centralized logging configuration judge_runner.py # Judge CLI with batch/single modes main.py # Entry point runner.py # Experiment orchestration |
