From 80ce03b4d36bae1ce39f88a36d3b73e7e017c55a Mon Sep 17 00:00:00 2001 From: msranjana Date: Sat, 11 Jul 2026 00:42:19 +0530 Subject: [PATCH 1/2] fix(cli): replace default logging with RichHandler --- src/tether/cli.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/tether/cli.py b/src/tether/cli.py index bd84cc9..4896beb 100644 --- a/src/tether/cli.py +++ b/src/tether/cli.py @@ -1,6 +1,7 @@ """Tether CLI — deploy VLA models to edge hardware.""" from __future__ import annotations +from rich.logging import RichHandler import json import logging @@ -59,10 +60,15 @@ def _setup_logging(verbose: bool = False) -> None: level = logging.DEBUG if verbose else logging.INFO logging.basicConfig( - level=level, - format="%(levelname)s %(name)s: %(message)s", - stream=sys.stderr, - ) + level=level, + format="%(message)s", + handlers=[ + RichHandler( + rich_tracebacks=True, + show_path=False, + ) + ], +) def _tether_home() -> Path: From ab0399b8488d333f86061bebc534f92d68d6394f Mon Sep 17 00:00:00 2001 From: Divyansh Rawat Date: Mon, 13 Jul 2026 09:54:50 +0530 Subject: [PATCH 2/2] fix(cli): route RichHandler logs to stderr, restore logger name RichHandler's default console writes to stdout, which would interleave log output into the JSON payloads of `tether benchmark --json` and `tether verify --json` and break `| jq` pipelines. Pin the handler to a stderr Console to preserve the stream contract from v0.11.2. Also restore %(name)s in the format string so logger attribution (tether.runtime.server vs tether.exporters.monolithic) survives, and move the rich import into the third-party block. --- src/tether/cli.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/tether/cli.py b/src/tether/cli.py index 4896beb..90e9796 100644 --- a/src/tether/cli.py +++ b/src/tether/cli.py @@ -1,7 +1,6 @@ """Tether CLI — deploy VLA models to edge hardware.""" from __future__ import annotations -from rich.logging import RichHandler import json import logging @@ -12,6 +11,7 @@ import typer from rich.console import Console +from rich.logging import RichHandler from rich.table import Table from tether import __version__ @@ -60,15 +60,18 @@ def _setup_logging(verbose: bool = False) -> None: level = logging.DEBUG if verbose else logging.INFO logging.basicConfig( - level=level, - format="%(message)s", - handlers=[ - RichHandler( - rich_tracebacks=True, - show_path=False, - ) - ], -) + level=level, + format="%(name)s: %(message)s", + handlers=[ + RichHandler( + # stderr keeps stdout clean for `--json` consumers and shell + # pipelines; RichHandler's default console writes to stdout. + console=Console(stderr=True), + rich_tracebacks=True, + show_path=False, + ) + ], + ) def _tether_home() -> Path: