]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
gui: Improve loglevel message.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 4 Dec 2022 19:21:55 +0000 (20:21 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 11 Mar 2023 18:16:46 +0000 (19:16 +0100)
When changing the log level, show the new severity string rather than
its numerical representation.

gui.c

diff --git a/gui.c b/gui.c
index ebfab3564836e7b1708dc430e9375815b00d49b7..0f3a3550b44317d59bad1fcf1dd9dbe55820dc2b 100644 (file)
--- 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)