Skip to content

refactor: replace verbose flag with structured payload logging and simplify config#8

Merged
JaredHatfield merged 1 commit into
mainfrom
refactor/logging-and-config
May 23, 2026
Merged

refactor: replace verbose flag with structured payload logging and simplify config#8
JaredHatfield merged 1 commit into
mainfrom
refactor/logging-and-config

Conversation

@JaredHatfield
Copy link
Copy Markdown
Member

Summary

Refactors the proxy's logging and configuration system, replacing the old verbose/debug flags with a cleaner, file-based structured logging approach.

Changes

CLI & Config

  • Removed --verbose, --host, --port, and --ui CLI flags (now configured via YAML config only)
  • Added --log PATH flag to write request/response payload logs to a file
  • Removed jsonl UI mode — only tui and plain remain
  • Simplified resolveMode to auto-detect TUI vs plain based on terminal presence

Logging

  • Replaced verbose console logging with structured payload logging via logOutput
  • New log format includes timestamped headers with payload blocks (JSON-indented when possible)
  • Logs requests, responses, SSE stream chunks, and error cases
  • Thread-safe logging with sync.Mutex

UI

  • Added q key handler in plain mode to quit via stdin
  • Removed model stats aggregation for failed/error responses from snapshot

Other

  • Reduced graceful shutdown timeout from 5s to 500ms
  • Updated docs (EXAMPLES.md, USAGE.md)

…mplify config

- Remove --verbose, --host, --port, --ui, and --ui-mode CLI flags
- Add --log flag to write request/response payload logs to a file
- Replace verbose console logging with structured log output via logOutput
- Add payload formatting with JSON indentation for readable logs
- Add response logging for SSE streams, JSON responses, and errors
- Add thread-safe logging with sync.Mutex
- Add plain mode 'q' command to quit via stdin listener
- Simplify resolveMode to only detect TUI vs plain (no more jsonl)
- Remove jsonl UI mode entirely
- Remove model stats aggregation for failed/error responses
- Reduce shutdown timeout from 5s to 500ms
- Update docs accordingly
@JaredHatfield JaredHatfield merged commit 93a33ab into main May 23, 2026
4 checks passed
@JaredHatfield JaredHatfield deleted the refactor/logging-and-config branch May 23, 2026 01:15
@github-project-automation github-project-automation Bot moved this from Todo to Done in UnitVectorY Labs May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant