common: add LOG_JSON macro to log structured data (#28586)

* add LOG_JSON macro

* fit: add demo LOG_JSON
This commit is contained in:
Xuan-Son Nguyen
2026-09-13 01:36:34 +02:00
committed by GitHub
parent acecd56032
commit 8e330954ad
4 changed files with 123 additions and 15 deletions
+1 -1
View File
@@ -3875,7 +3875,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
{"--no-log-jsonl"},
"Log as JSONL (one JSON object per line) to stdout, this also disables colored logging (default: disabled)",
[](common_params &, bool value) {
common_log_set_jsonl(common_log_main(), value);
common_log_set_jsonl(value);
}
).set_env("LLAMA_ARG_LOG_JSONL"));
add_opt(common_arg(