common: improve verbosity level definitions (#17630)

* common: improve verbosity level definitions

* string_format

* update autogen docs
This commit is contained in:
Xuan-Son Nguyen
2025-12-01 14:38:13 +01:00
committed by GitHub
parent cd3c118908
commit 7733409734
6 changed files with 46 additions and 19 deletions
+7 -1
View File
@@ -2674,7 +2674,13 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
).set_env("LLAMA_OFFLINE"));
add_opt(common_arg(
{"-lv", "--verbosity", "--log-verbosity"}, "N",
"Set the verbosity threshold. Messages with a higher verbosity will be ignored.",
string_format("Set the verbosity threshold. Messages with a higher verbosity will be ignored. Values:\n"
" - 0: generic output\n"
" - 1: error\n"
" - 2: warning\n"
" - 3: info\n"
" - 4: debug\n"
"(default: %d)\n", params.verbosity),
[](common_params & params, int value) {
params.verbosity = value;
common_log_set_verbosity_thold(value);