Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reduce the size of the tests, so that it runs decently fast
[simgrid.git] / testsuite / xbt / log_usage.c
index 3a6f864..26679d4 100644 (file)
 GRAS_LOG_NEW_DEFAULT_SUBCATEGORY(Test, Top);
 GRAS_LOG_NEW_CATEGORY(Top);
 
-int main(int ac, char **av) {
-  gras_error_t errcode;
+int main(int argc, char **argv) {
+  gras_init_defaultlog(&argc,argv,"root.thresh=debug log.thresh=debug");
 
-  if (ac > 1) {
-    TRYFAIL(gras_log_control_set(av[1]));
-  } else {
-    TRYFAIL(gras_log_control_set("root.thresh=debug log.thresh=debug"));
-  }
   DEBUG1("val=%d", 1);
-  WARNING1("val=%d", 2);
+  WARN1("val=%d", 2);
   CDEBUG2(Top, "val=%d%s", 3, "!");
   CRITICAL6("false alarm%s%s%s%s%s%s", "","","","","","!");
   
+  gras_exit();
   return 0;
 }