Commit Graph

5 Commits

Author SHA1 Message Date
lilong.129
a78ba90d33 refactor: config results path 2025-06-15 23:31:36 +08:00
lilong.129
f5f6d177ab fix: optimize report command to avoid creating timestamp directories
- Implement lazy loading for directory creation in config.go
- Add logFile parameter to InitLogger for better control
- Use dynamic directory existence check instead of flags
- Report command now uses console-only logging to prevent directory creation
- Support both JSON and colorized console output formats
- Maintain backward compatibility for all other commands

Changes:
- config.go: Convert directory paths to getter methods with lazy creation
- logger.go: Add logFile parameter and improve logging control
- cmd/root.go: Detect report command and disable file logging
- uixt/*: Update all references to use new getter methods

Fixes the issue where 'hrp report results/' would create unwanted timestamp directories
2025-06-10 12:06:08 +08:00
lilong.129
f1544d4a5c feat: implement separate log levels for console and file output
- Console logger respects user-specified log level
- File logger always uses DEBUG level to capture all logs
- Add custom leveledMultiWriter for different output levels
- Remove global log level setting for more granular control
2025-06-09 19:16:39 +08:00
lilong.129
e75edf8400 feat: add log file output to results/taskID directory 2025-06-07 16:52:41 +08:00
lilong.129
1f063dd6f7 refactor: move hrp/ to root folder 2025-02-06 11:03:41 +08:00