Skip to content

Improved border styling and logging#48

Merged
wham merged 3 commits intomainfrom
copilot/enforce-slog-logging-only
Dec 20, 2025
Merged

Improved border styling and logging#48
wham merged 3 commits intomainfrom
copilot/enforce-slog-logging-only

Conversation

Copy link
Contributor

Copilot AI commented Dec 20, 2025

The codebase mixed fmt.Fprintf(os.Stderr, ...) for error output with slog for logging, violating the spec requirement that slog be the only logging mechanism.

Changes

  • Replaced three fmt.Fprintf(os.Stderr, ...) calls with slog.Error():
    • Login failure (line 4260)
    • Unknown command (line 4620)
    • Bubble Tea initialization error (line 4679)

Before:

fmt.Fprintf(os.Stderr, "Login failed: %v\n", err)

After:

slog.Error("Login failed", "error", err)

Non-logging fmt usage preserved

CLI output (--help, --version) intentionally remains as fmt.Print* - these are user-facing messages, not logs.

Original prompt

Update the code to ensure slog is the only option how logging is done. Avoid fmt or other ways.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: wham <448809+wham@users.noreply.github.com>
Copilot AI changed the title [WIP] Update code to use slog exclusively for logging Replace fmt error output with slog.Error for consistent structured logging Dec 20, 2025
Copilot AI requested a review from wham December 20, 2025 04:38
@wham wham changed the title Replace fmt error output with slog.Error for consistent structured logging Improved border styling and logging Dec 20, 2025
@wham wham marked this pull request as ready for review December 20, 2025 05:22
@wham wham added the minor label Dec 20, 2025
@wham wham merged commit 7a395ec into main Dec 20, 2025
6 checks passed
@wham wham deleted the copilot/enforce-slog-logging-only branch December 20, 2025 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants