mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-12 12:06:04 +00:00
fix(logging): add setup_logging() call to CLI entry point
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 <noreply@anthropic.com>
This commit is contained in:
parent
9a43a461ec
commit
0eff56515d
1 changed files with 5 additions and 0 deletions
|
|
@ -6,6 +6,8 @@
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
|
from llama_stack.log import setup_logging
|
||||||
|
|
||||||
from .stack import StackParser
|
from .stack import StackParser
|
||||||
from .stack.utils import print_subcommand_description
|
from .stack.utils import print_subcommand_description
|
||||||
|
|
||||||
|
|
@ -42,6 +44,9 @@ class LlamaCLIParser:
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
# Initialize logging from environment variables before any other operations
|
||||||
|
setup_logging()
|
||||||
|
|
||||||
parser = LlamaCLIParser()
|
parser = LlamaCLIParser()
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
parser.run(args)
|
parser.run(args)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue