Skip to content

Distribute and run LLMs with a single file.

Add --log-disable flag to server

Ziad Ben Hadj-Alouanec64989a5a465
diff --git a/llama.cpp/server/server.cpp b/llama.cpp/server/server.cpp
index 10092b6e..1677622d 100644
--- a/llama.cpp/server/server.cpp
+++ b/llama.cpp/server/server.cpp
@@ -1959,6 +1959,7 @@ static void server_print_usage(const char *argv0, const gpt_params &params,
printf(" -spf FNAME, --system-prompt-file FNAME\n");
printf(" Set a file to load a system prompt (initial prompt of all slots), this is useful for chat applications.\n");
printf(" --mmproj MMPROJ_FILE path to a multimodal projector file for LLaVA.\n");
+ printf(" --log-disable disables logging to a file.\n");
printf(" --nobrowser Do not attempt to open a web browser tab at startup.\n");
printf(" --unsecure disables pledge() sandboxing on Linux and OpenBSD\n");
printf("\n");
@@ -2297,6 +2298,11 @@ static void server_params_parse(int argc, char **argv, server_params &sparams,
}
params.mmproj = argv[i];
}
+ else if (arg == "--log-disable")
+ {
+ log_set_target(stdout);
+ LOG_INFO("logging to file is disabled.", {});
+ }
else if (arg == "--nobrowser")
{
sparams.nobrowser = true;