Browse Source

ncd: use default loglevel BLOG_INFO for all channels

ambrop7 13 years ago
parent
commit
bbc30074ce
2 changed files with 5 additions and 0 deletions
  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) {
         else if (options.loglevel >= 0) {
             BLog_SetChannelLoglevel(i, options.loglevel);
             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
 // how long to wait after an error before retrying
 #define DEFAULT_RETRY_TIME 5000
 #define DEFAULT_RETRY_TIME 5000
+
+// default loglevel
+#define DEFAULT_LOGLEVEL BLOG_WARNING