Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Bug fix. I wonder how this function may have ever worked...
[simgrid.git] / testsuite / xbt / log_usage.c
index 180dd4e..80a2160 100644 (file)
@@ -22,13 +22,25 @@ XBT_LOG_NEW_CATEGORY(top,"Useless test channel");
 #pragma argsused
 #endif
 
-int main(int argc, char **argv) {
-  xbt_init(&argc,argv);
-
+static void dolog(const char *settings) {
+  INFO1("Test with the settings '%s'",settings);
+  xbt_log_control_set(settings);
   DEBUG1("val=%d", 1);
   WARN1("val=%d", 2);
   CDEBUG2(top, "val=%d%s", 3, "!");
-  CRITICAL6("false alarm%s%s%s%s%s%s", "","","","","","!");
+  CRITICAL6("false alarm%s%s%s%s%s%s", "","","","","","!");   
+}
+
+
+int main(int argc, char **argv) {
+  xbt_init(&argc,argv);
+
+  dolog("");
+  dolog(" ");
+  dolog(" test.thres:info root.thres:info  ");
+  dolog(" test.thres:debug ");
+  dolog(" test.thres:verbose root.thres:error ");
+  dolog(" test.thres:critical ");
   
   xbt_exit();
   return 0;