chore: add color to Env Variable message (#1525)

# What does this PR do?

currently the `"Environment variable LLAMA_STACK_LOGGING found"` message
is printed with no color switch to cprint and highlight in yellow for
visibility

Signed-off-by: Charlie Doern <cdoern@redhat.com>
This commit is contained in:
Charlie Doern 2025-03-10 18:29:40 -04:00 committed by Kevin Cogan
parent 95ea90248a
commit acffc8c2a1
No known key found for this signature in database
GPG key ID: 79BDE38B5A18DE42

View file

@ -12,6 +12,7 @@ from typing import Dict
from rich.console import Console from rich.console import Console
from rich.errors import MarkupError from rich.errors import MarkupError
from rich.logging import RichHandler from rich.logging import RichHandler
from termcolor import cprint
# Default log level # Default log level
DEFAULT_LOG_LEVEL = logging.INFO DEFAULT_LOG_LEVEL = logging.INFO
@ -176,7 +177,7 @@ def get_logger(name: str, category: str = "uncategorized") -> logging.LoggerAdap
env_config = os.environ.get("LLAMA_STACK_LOGGING", "") env_config = os.environ.get("LLAMA_STACK_LOGGING", "")
if env_config: if env_config:
print(f"Environment variable LLAMA_STACK_LOGGING found: {env_config}") cprint(f"Environment variable LLAMA_STACK_LOGGING found: {env_config}", "yellow")
_category_levels.update(parse_environment_config(env_config)) _category_levels.update(parse_environment_config(env_config))
setup_logging(_category_levels) setup_logging(_category_levels)