From 509dfc3f807cbbf66f0df6b05a2115a3dcf02597 Mon Sep 17 00:00:00 2001 From: "fangyaozheng@bytedance.com" Date: Wed, 31 Dec 2025 16:56:51 +0800 Subject: [PATCH] fix(cli-web): fix logging level not work by add basic config --- veadk/cli/cli_web.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/veadk/cli/cli_web.py b/veadk/cli/cli_web.py index 89a9638c..64a74055 100644 --- a/veadk/cli/cli_web.py +++ b/veadk/cli/cli_web.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import logging from functools import wraps import click @@ -139,5 +140,14 @@ async def wrapper(*args, **kwargs) -> ADKRunner: # from Google ADK and Litellm if "--log_level" not in extra_args: extra_args.extend(["--log_level", "ERROR"]) + logging.basicConfig(level=logging.ERROR, force=True) + + if "--log_level" in extra_args: + logging.basicConfig( + level=getattr( + logging, extra_args[extra_args.index("--log_level") + 1].upper() + ), + force=True, + ) cli_web.main(args=extra_args, standalone_mode=False)