Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
4cbd4f38
Unverified
Commit
4cbd4f38
authored
Aug 04, 2025
by
ishandhanani
Committed by
GitHub
Aug 05, 2025
Browse files
fix: show raw sglang logs given env var (#2287)
parent
78ffe3d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
lib/bindings/python/src/dynamo/runtime/logging.py
lib/bindings/python/src/dynamo/runtime/logging.py
+19
-2
No files found.
lib/bindings/python/src/dynamo/runtime/logging.py
View file @
4cbd4f38
...
...
@@ -93,8 +93,10 @@ def configure_dynamo_logging(
dyn_level
=
log_level_mapping
(
dyn_var
)
# configure inference engine loggers
configure_vllm_logging
(
dyn_level
)
configure_sglang_logging
(
dyn_level
)
if
not
get_bool_env_var
(
"DYN_SKIP_VLLM_LOG_FORMATTING"
):
configure_vllm_logging
(
dyn_level
)
if
not
get_bool_env_var
(
"DYN_SKIP_SGLANG_LOG_FORMATTING"
):
configure_sglang_logging
(
dyn_level
)
# loggers that should be configured to ERROR
error_loggers
=
[
"tag"
]
...
...
@@ -189,3 +191,18 @@ def configure_vllm_logging(dyn_level: int):
with
tempfile
.
NamedTemporaryFile
(
mode
=
"w"
,
suffix
=
".json"
,
delete
=
False
)
as
f
:
json
.
dump
(
vllm_config
,
f
)
os
.
environ
[
"VLLM_LOGGING_CONFIG_PATH"
]
=
f
.
name
def
get_bool_env_var
(
name
:
str
,
default
:
str
=
"false"
)
->
bool
:
value
=
os
.
getenv
(
name
,
default
)
value
=
value
.
lower
()
truthy_values
=
(
"true"
,
"1"
)
falsy_values
=
(
"false"
,
"0"
)
if
(
value
not
in
truthy_values
)
and
(
value
not
in
falsy_values
):
logging
.
warning
(
f
"The environment variable
{
name
}
has an unrecognized value=
{
value
}
, treating as false"
)
return
value
in
truthy_values
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment