-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Problem Description
Currently, cocli commands provide minimal output during operation, making it difficult to troubleshoot issues or understand what the tool is doing internally. When commands fail, users often get generic error messages without detailed context about the processing steps.
Proposed Solution
Add comprehensive verbose logging support across all cocli commands with:
- Global --verbose/-v flag: Enable detailed output for all operations
- Structured logging: Show processing steps, file operations, and validation details
- Debug mode: Include internal data structures and raw CBOR/JSON content
- Progress indicators: For batch operations on multiple files
- Performance metrics: Show timing information for operations
Implementation Details
Core Features:
- Add global verbose flag to root command
- Implement structured logging with different levels (INFO, DEBUG, TRACE)
- Show file processing details (reading, parsing, validation steps)
- Display intermediate data transformations
- Include timing metrics for performance analysis
Command-Specific Enhancements:
- comid/corim/cots display: Show parsing steps and validation details
- corim verify: Display signature verification process and certificate chain details
- corim extract: Show extraction progress and file writing operations
- corim submit: Display HTTP request/response details and authentication steps
- Batch operations: Progress bars and individual file processing status
Example Usage:
# Basic verbose output
cocli corim display --file signed-corim.cbor --verbose
# Debug mode with full details
cocli corim verify --file signed-corim.cbor --key key.jwk --verbose --debug
# Batch processing with progress
cocli comid display --dir comids/ --verboseBenefits
- Improved Debugging: Users can see exactly where operations fail
- Better UX: Clear progress indication for long-running operations
- Development Aid: Easier to debug cocli itself and understand data flows
- Educational: Users can learn about CoRIM/CoMID processing steps
- Performance Insights: Identify bottlenecks in large batch operations
Acceptance Criteria
- Global --verbose flag added to root command
- Structured logging implementation with configurable levels
- All commands enhanced with verbose output
- Progress indicators for batch operations
- Performance timing metrics
- Comprehensive test coverage for new logging features
- Updated documentation with verbose mode examples
This enhancement would significantly improve the user experience and debugging capabilities of cocli without changing any existing functionality.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels