From: Andre Noll Date: Sun, 4 Dec 2022 19:21:55 +0000 (+0100) Subject: gui: Improve loglevel message. X-Git-Tag: v0.7.3~29 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=ae8d8fcfdeee15ea2720b0103a00e04537927035 gui: Improve loglevel message. When changing the log level, show the new severity string rather than its numerical representation. --- diff --git a/gui.c b/gui.c index ebfab356..0f3a3550 100644 --- a/gui.c +++ b/gui.c @@ -1267,6 +1267,12 @@ err_out: print_in_bar(COLOR_ERRMSG, "top of buffer is shown\n"); } +static void print_ll_msg(void) +{ + const char *sev[] = {SEVERITIES}; + print_in_bar(COLOR_MSG, "new loglevel: %s\n", sev[loglevel]); +} + static void com_ll_decr(void) { if (loglevel <= LL_DEBUG) { @@ -1275,7 +1281,7 @@ static void com_ll_decr(void) return; } loglevel--; - print_in_bar(COLOR_MSG, "loglevel set to %d\n", loglevel); + print_ll_msg(); } static void com_ll_incr(void) @@ -1286,7 +1292,7 @@ static void com_ll_incr(void) return; } loglevel++; - print_in_bar(COLOR_MSG, "loglevel set to %d\n", loglevel); + print_ll_msg(); } static void com_reread_conf(void)