common: add --log-jsonl (#28437)

* common: add --log-jsonl

* rename unknown to none
This commit is contained in:
Xuan-Son Nguyen
2026-09-06 08:21:22 +02:00
committed by GitHub
parent c457e3bf7f
commit 7620399f58
6 changed files with 54 additions and 4 deletions
+8
View File
@@ -3901,6 +3901,14 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
common_log_set_file(common_log_main(), value.c_str());
}
).set_env("LLAMA_ARG_LOG_FILE"));
add_opt(common_arg(
{"--log-jsonl"},
{"--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);
}
).set_env("LLAMA_ARG_LOG_JSONL"));
add_opt(common_arg(
{"--log-prompts-dir"}, "PATH",
"Log prompts to directory (auto-created if not present; only used for debugging, default: disabled)",