feat(logging): add structured logging with slog and charmbracelet/log#59
Merged
feat(logging): add structured logging with slog and charmbracelet/log#59
Conversation
Current behavior: CLI output was limited to fmt.Printf statements with no verbosity control, making troubleshooting difficult when operations failed silently. New behavior: Integrated structured logging throughout the CLI stack using Go's slog with charmbracelet/log as the handler for pleasant terminal output. - Added global -v flag (stackable: -v for info, -vv for debug) - Default verbosity is quiet (errors only) - Created internal/slogger package for logger initialization - Converted command output to slog Info messages - Added Debug logging to instance, container, and git operations - All logging outputs to stderr (command data stays on stdout) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Current behavior: All user-facing messages (instance created, session created, etc.) were converted to slog which outputs to stderr, causing integration tests to fail because they expect these messages on stdout. New behavior: User-facing command results (e.g., "Instance ready", "Stopped instance") go to stdout via fmt.Printf, while debug/diagnostic logging stays on stderr via slog. This follows CLI conventions where command output goes to stdout and diagnostics/errors go to stderr. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
headjack | 69eee3e | Commit Preview URL Branch Preview URL |
Jan 05 2026, 09:04 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
-vflag for verbosity control (-vfor info,-vvfor debug)internal/sloggerpackage using Go'sslogwithcharmbracelet/loghandlerfmt.Printfto structured slog messagesVerbosity Levels
-v-vvTest plan
just checkpasses (format, lint, tests)hjk run <branch>shows no output by defaulthjk -v run <branch>shows info messageshjk -vv run <branch>shows debug messages🤖 Generated with Claude Code