Skip to content

feat: add debug logging and --verbose flag (M4.2)#48

Open
YoungJinJung wants to merge 1 commit intomainfrom
feat/verbose-logging
Open

feat: add debug logging and --verbose flag (M4.2)#48
YoungJinJung wants to merge 1 commit intomainfrom
feat/verbose-logging

Conversation

@YoungJinJung
Copy link
Copy Markdown
Contributor

Summary

Add structured debug logging and a --verbose / -v CLI flag for troubleshooting (M4.2).

  • New internal/log package: JSON logging to ~/.config/unic/logs/unic.log with size-based rotation (10MB, keep 3 old files), and a pretty stderr handler with colored levels and tree-formatted key-value attributes
  • --verbose / -v global flag enables debug-level output to both file and stderr
  • Instrumented config resolution, auth flow (SSO, credential, assume-role), AWS repository creation, and all AWS service API calls (EC2, RDS, VPC, Route53, Secrets Manager, SSM)

Related Issues

Closes #33

Validation

  • make test — all tests pass (7 new tests in internal/log)
  • make build — compiles cleanly
  • Manual: unic --verbose produces aligned, colored debug output on stderr and JSON entries in the log file

Checklist

  • Scope is focused
  • Docs updated (if needed)
  • Tests/validation included
  • Breaking changes documented

- Add internal/log package with structured JSON logging to
  ~/.config/unic/logs/unic.log, size-based rotation (10MB, 3 old files),
  and pretty stderr output with colored levels and tree-formatted attrs
- Add --verbose/-v global CLI flag to enable debug-level logging
- Instrument config resolution, auth flow, AWS repository creation,
  and all AWS service API calls with debug/info logging
- Use \r\n line endings in pretty handler for raw-mode terminal compat
- Update README with --verbose usage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Add debug logging and --verbose flag (M4.2)

2 participants