From 135cd47f8f3819783ff9a7916e1d26be92d78cc6 Mon Sep 17 00:00:00 2001 From: Nikketryhard Date: Mon, 16 Feb 2026 19:44:23 -0600 Subject: [PATCH] fix: proxyctl logs no longer hangs logs command was using journalctl -f (follow) which blocks forever. Split into three commands: - logs [N]: show last N lines and exit (default 30) - logs-follow [N]: tail + follow (old behavior) - logs-all: full dump --- scripts/proxyctl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/proxyctl b/scripts/proxyctl index e7f4334..5cc1908 100755 --- a/scripts/proxyctl +++ b/scripts/proxyctl @@ -24,8 +24,9 @@ usage() { echo -e " ${CYAN}restart${NC} Rebuild + restart" echo -e " ${CYAN}rebuild${NC} Build release binary only" echo -e " ${CYAN}status${NC} Service status + quota + usage" - echo -e " ${CYAN}logs${NC} [N] Tail last N lines (default 30) + follow" - echo -e " ${CYAN}logs-all${NC} Full log dump (no follow)" + echo -e " ${CYAN}logs${NC} [N] Show last N lines (default 30)" + echo -e " ${CYAN}logs-follow${NC} [N] Tail last N lines + follow" + echo -e " ${CYAN}logs-all${NC} Full log dump" echo -e " ${CYAN}test${NC} [msg] Quick test request (gemini-3-flash)" echo -e " ${CYAN}health${NC} Health check" echo "" @@ -91,6 +92,11 @@ do_status() { } do_logs() { + local lines="${1:-30}" + journalctl --user -u "$SERVICE" --no-pager -n "$lines" +} + +do_logs_follow() { local lines="${1:-30}" journalctl --user -u "$SERVICE" --no-pager -n "$lines" -f } @@ -123,8 +129,9 @@ case "${1:-}" in restart) do_restart ;; rebuild) do_build ;; status) do_status ;; - logs) do_logs "${2:-30}" ;; - logs-all) do_logs_all ;; + logs) do_logs "${2:-30}" ;; + logs-follow) do_logs_follow "${2:-30}" ;; + logs-all) do_logs_all ;; test) do_test "${2:-}" ;; health) do_health ;; *) usage ;;