main: add messages to udebug regardless of their log level
authorFelix Fietkau <nbd@nbd.name>
Tue, 3 Sep 2024 09:26:52 +0000 (11:26 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 3 Sep 2024 10:02:07 +0000 (12:02 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
main.c

diff --git a/main.c b/main.c
index 375c6ab7873d075d4a6aa6f7eea15bed9fc6ef4d..4c4b1ff18dda766feb37c0fb06643e61d099c323 100644 (file)
--- a/main.c
+++ b/main.c
@@ -121,13 +121,13 @@ netifd_log_message(int priority, const char *format, ...)
 {
        va_list vl;
 
-       if (priority > log_level)
-               return;
-
        va_start(vl, format);
        netifd_udebug_vprintf(format, vl);
        va_end(vl);
 
+       if (priority > log_level)
+               return;
+
        va_start(vl, format);
        if (use_syslog)
                vsyslog(log_class[priority], format, vl);