mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-28 02:53:30 +00:00
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:
parent
a64021bb47
commit
7559b4055e
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue