From 35e08b34fe17d024b5b189f1623f9ead2295086a Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 19 Feb 2023 19:47:54 +0200 Subject: [PATCH 39/39] Pass log level by name to the spawned server Using numeric levels is deprecated. See osdn #45583 Signed-off-by: Marko Lindqvist --- client/connectdlg_common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/connectdlg_common.c b/client/connectdlg_common.c index 08357e90dc..0158374599 100644 --- a/client/connectdlg_common.c +++ b/client/connectdlg_common.c @@ -332,7 +332,7 @@ bool client_start_server(void) enum log_level llvl = log_get_level(); argv[argc++] = "--debug"; - fc_snprintf(dbg_lvl_buf, sizeof(dbg_lvl_buf), "%d", llvl); + fc_snprintf(dbg_lvl_buf, sizeof(dbg_lvl_buf), "%s", log_level_name(llvl)); argv[argc++] = dbg_lvl_buf; argv[argc++] = "--log"; argv[argc++] = logfile; @@ -462,7 +462,8 @@ bool client_start_server(void) internal_to_local_string_malloc(logfile); enum log_level llvl = log_get_level(); - fc_snprintf(logcmdline, sizeof(logcmdline), " --debug %d --log %s", llvl, + fc_snprintf(logcmdline, sizeof(logcmdline), " --debug %s --log %s", + log_level_name(llvl), logfile_in_local_encoding); free(logfile_in_local_encoding); } -- 2.39.1