Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use new style logging macros.
[simgrid.git] / examples / gras / properties / properties.c
index ce8372e..8f93be0 100644 (file)
@@ -26,21 +26,21 @@ int alice(int argc, char *argv[])
   /* Let the other process change the host props */
   gras_os_sleep(1);
 
-  INFO0("== Dump all the properties of current host");
+  XBT_INFO("== Dump all the properties of current host");
   xbt_dict_foreach(host_props, cursor, key, data)
-      INFO2("  Host property: '%s' has value: '%s'", key, data);
+      XBT_INFO("  Host property: '%s' has value: '%s'", key, data);
 
-  INFO0("== Dump all the properties of alice");
+  XBT_INFO("== Dump all the properties of alice");
   xbt_dict_foreach(process_props, cursor, key, data)
       if (!strncmp(key, "SG_TEST_", 8))
-    INFO2("  Process property: '%s' has value: '%s'", key, data);
+    XBT_INFO("  Process property: '%s' has value: '%s'", key, data);
 
-  INFO0("== Try to get a process property that does not exist");
+  XBT_INFO("== Try to get a process property that does not exist");
   value = gras_process_property_value("Nonexisting");
   xbt_assert0(!value, "nonexisting property exists!!");
 
   /* Modify an existing property. First check it exists */
-  INFO0("== Trying to modify a process property");
+  XBT_INFO("== Trying to modify a process property");
   value = gras_process_property_value("new prop");
   xbt_assert0(!value, "Property 'new prop' exists before I add it!");
   xbt_dict_set(process_props, "new prop", xbt_strdup("new value"),
@@ -66,23 +66,23 @@ int bob(int argc, char *argv[])
   char *key, *data;
   const char *value;
 
-  INFO0("== Dump all the properties of host1");
+  XBT_INFO("== Dump all the properties of host1");
   xbt_dict_foreach(host_props, cursor, key, data)
-      INFO2("  Host property: '%s' has value: '%s'", key, data);
+      XBT_INFO("  Host property: '%s' has value: '%s'", key, data);
 
-  INFO0("== Try to get a property that does not exist");
+  XBT_INFO("== Try to get a property that does not exist");
   value = gras_os_host_property_value("non existing key");
   xbt_assert1(value == NULL,
               "The key 'non existing key' exists (with value '%s')!!",
               value);
 
-  INFO0
+  XBT_INFO
       ("== Set a host property that alice will try to retrieve in SG (from bob->hello)");
   xbt_dict_set(host_props, "from bob", xbt_strdup("hello"), xbt_free_f);
 
-  INFO0("== Dump all the properties of host1 again to check the addition");
+  XBT_INFO("== Dump all the properties of host1 again to check the addition");
   xbt_dict_foreach(host_props, cursor, key, data)
-      INFO2("  Host property: '%s' has value: '%s'", key, data);
+      XBT_INFO("  Host property: '%s' has value: '%s'", key, data);
 
   gras_os_sleep(1);             /* KILLME once bug on empty main is solved */
   gras_exit();