From 0eff56515de5f54a44a5ea0af877f6e101c897a7 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Tue, 21 Oct 2025 11:00:55 -0700 Subject: [PATCH] fix(logging): add setup_logging() call to CLI entry point MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ensure logging is properly initialized before any CLI commands execute. This prevents loggers created at module level from being initialized before the logging system is configured. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- llama_stack/cli/llama.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/llama_stack/cli/llama.py b/llama_stack/cli/llama.py index 5ff15d8d7..aa8893bc0 100644 --- a/llama_stack/cli/llama.py +++ b/llama_stack/cli/llama.py @@ -6,6 +6,8 @@ import argparse +from llama_stack.log import setup_logging + from .stack import StackParser from .stack.utils import print_subcommand_description @@ -42,6 +44,9 @@ class LlamaCLIParser: def main(): + # Initialize logging from environment variables before any other operations + setup_logging() + parser = LlamaCLIParser() args = parser.parse_args() parser.run(args)