Skip to content

Switch logging from zap to slog, remove debug logging - #185

Open
nathanjcochran wants to merge 5 commits into
mainfrom
nathan/improve-logging
Open

Switch logging from zap to slog, remove debug logging#185
nathanjcochran wants to merge 5 commits into
mainfrom
nathan/improve-logging

Conversation

@nathanjcochran

@nathanjcochran nathanjcochran commented Aug 5, 2026

Copy link
Copy Markdown
Member

Replaces the internal/logging zap wrapper with the standard library's slog, adopting the patterns Ghost uses.

Logging is now reserved for the MCP server, which is the only long-running backend process the CLI hosts. tiger mcp start builds a logger over the command's stderr and hands it to mcp.NewServer, which uses it for its own output and also passes it to the MCP SDK (which uses it for its own internal logging). Everywhere else — CLI commands, analytics, MCP install, the signal handler — writes to stdout/stderr directly or returns an error. Log statements outside the MCP server (which produced structured log lines interspersed with the normal CLI output, which looked pretty bad imo) were removed rather than converted. None of them seemed very useful anyways, except perhaps to the developer originally building the feature (but developers can always put in their own print statements as needed during development - I don't think they need to remain in the committed code).

Within the MCP server the logging is deliberately sparse, matching Ghost: we mostly log failures that would otherwise be swallowed, not per-step tracing. Startup emits almost nothing, so the logs are mostly silent until something goes wrong.

Because there is no longer a log level to configure, the debug config option, TIGER_DEBUG, and --debug are gone. This is technically a backwards-incompatible change, but I doubt many actual end-users were using that feature, so I think it's probably safe to remove. But definitely let me know if you disagree.

…rors

Removes the per-step registration and proxy tracing so `tiger mcp start` is
silent until something goes wrong, applies the "Method not found" guard to all
four docs-proxy registrations, and makes `mcp start http` surface a Serve error
instead of logging it and blocking on a dead listener.
@nathanjcochran
nathanjcochran force-pushed the nathan/improve-logging branch from d53a5fc to e7d9efa Compare August 6, 2026 17:26
@nathanjcochran nathanjcochran self-assigned this Aug 6, 2026
@nathanjcochran
nathanjcochran marked this pull request as ready for review August 6, 2026 19:51
@nathanjcochran nathanjcochran changed the title Switch logging from zap to slog, following Ghost's patterns Switch logging from zap to slog, remove debug logging Aug 6, 2026

@Askir Askir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, I don't think the --debug change is problematic. And we are below 1.x so I think small "breaking" changes like this are definitely okay if we put them into the changelog.

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.

2 participants