From 9d6c99b3d810c395c8207953fc50b6c4bbd9e367 Mon Sep 17 00:00:00 2001 From: Eric Huang Date: Wed, 5 Mar 2025 21:09:19 -0800 Subject: [PATCH] chore: use rich to format logs Summary: Test Plan: Summary: Test Plan: --- src/llama_stack_client/_utils/_logs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/llama_stack_client/_utils/_logs.py b/src/llama_stack_client/_utils/_logs.py index 49f3ee8c..77e8dc24 100644 --- a/src/llama_stack_client/_utils/_logs.py +++ b/src/llama_stack_client/_utils/_logs.py @@ -1,5 +1,6 @@ import os import logging +from rich.logging import RichHandler logger: logging.Logger = logging.getLogger("llama_stack_client") httpx_logger: logging.Logger = logging.getLogger("httpx") @@ -10,6 +11,7 @@ def _basic_config() -> None: logging.basicConfig( format="[%(asctime)s - %(name)s:%(lineno)d - %(levelname)s] %(message)s", datefmt="%Y-%m-%d %H:%M:%S", + handlers=[RichHandler(rich_tracebacks=True)], )