Преглед изворни кода

ncd: use default loglevel BLOG_INFO for all channels

ambrop7 пре 13 година
родитељ
комит
bbc30074ce
2 измењених фајлова са 5 додато и 0 уклоњено
  1. 2 0
      ncd/ncd.c
  2. 3 0
      ncd/ncd.h

+ 2 - 0
ncd/ncd.c

@@ -256,6 +256,8 @@ int main (int argc, char **argv)
         }
         else if (options.loglevel >= 0) {
             BLog_SetChannelLoglevel(i, options.loglevel);
+        } else {
+            BLog_SetChannelLoglevel(i, DEFAULT_LOGLEVEL);
         }
     }
     

+ 3 - 0
ncd/ncd.h

@@ -32,3 +32,6 @@
 
 // how long to wait after an error before retrying
 #define DEFAULT_RETRY_TIME 5000
+
+// default loglevel
+#define DEFAULT_LOGLEVEL BLOG_WARNING