[Core][Logging] Add built-in JSON formatter (#58739)
Add `--logging-config.formatter=json` to enable the python-json-logger formatter without having to use a complete Python logging dictConfig. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Co-authored-by: OpenAI Codex <noreply@openai.com>
This commit is contained in:
co-authored by
OpenAI Codex
parent
c4fc3c7d32
commit
91fcec1235
@@ -76,6 +76,8 @@ def test_logging_config_cli_args(serve_parser):
|
||||
[
|
||||
"--logging-config",
|
||||
'{"log_level":"WARNING","pylogging_config_file":"/tmp/json.json"}',
|
||||
"--logging-config.formatter",
|
||||
"json",
|
||||
"--log-level",
|
||||
"DEBUG",
|
||||
"--log-config-file",
|
||||
@@ -85,6 +87,7 @@ def test_logging_config_cli_args(serve_parser):
|
||||
|
||||
config = AsyncEngineArgs.from_cli_args(args).create_logging_config()
|
||||
assert config.log_level == "DEBUG"
|
||||
assert config.formatter == "json"
|
||||
assert config.pylogging_config_file == "/tmp/flat.json"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user