Commit 1bf9412
feat: Implement global debug flag (--debug/-d) for CLI
This commit connects the previously defined but unused DEBUG_OPTION to actual
debug logging functionality. When the --debug or -d flag is passed, the CLI
now enables DEBUG level logging for all modules, providing detailed diagnostic
information.
Changes:
- Added DEBUG_OPTION to imports in cli/app.py
- Created global_options callback to configure logging when debug flag is set
- Debug logging includes timestamps and module names for easy tracing
- Flag works with all commands (e.g., cam --debug config validate)
Usage:
cam --debug <command> # Enable debug logging
cam -d <command> # Short form
Example output shows:
- ConfigManager initialization details
- Config location discovery and loading
- Validation process details
- Timestamps and module source of each debug message
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 7983551 commit 1bf9412
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
36 | 50 | | |
37 | 51 | | |
38 | 52 | | |
| |||
0 commit comments