Skip to content

Commit 1d14411

Browse files
authored
server : add --log-disable to disable logging to file (#4260)
* * add --log-disable to disable logging to file in the server example * * typo fix
1 parent f43f093 commit 1d14411

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

examples/server/server.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -1961,6 +1961,7 @@ static void server_print_usage(const char *argv0, const gpt_params &params,
19611961
printf(" -spf FNAME, --system-prompt-file FNAME\n");
19621962
printf(" Set a file to load a system prompt (initial prompt of all slots), this is useful for chat applications.\n");
19631963
printf(" --mmproj MMPROJ_FILE path to a multimodal projector file for LLaVA.\n");
1964+
printf(" --log-disable disables logging to a file.\n");
19641965
printf("\n");
19651966
}
19661967

@@ -2315,6 +2316,11 @@ static void server_params_parse(int argc, char **argv, server_params &sparams,
23152316
}
23162317
params.mmproj = argv[i];
23172318
}
2319+
else if (arg == "--log-disable")
2320+
{
2321+
log_set_target(stdout);
2322+
LOG_INFO("logging to file is disabled.", {});
2323+
}
23182324
else
23192325
{
23202326
fprintf(stderr, "error: unknown argument: %s\n", arg.c_str());

0 commit comments

Comments
 (0)