Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Revert "These messages should be print in debug logs only"
authorChristophe Thiéry <christopho128@gmail.com>
Tue, 27 Sep 2011 14:22:54 +0000 (16:22 +0200)
committerChristophe Thiéry <christopho128@gmail.com>
Tue, 27 Sep 2011 14:22:54 +0000 (16:22 +0200)
This reverts commit ce5366b7ccfd889609351fcdd759891a2ceb0c9a.

src/bindings/lua/simgrid_lua.c

index c01a74b..c7b1bf6 100644 (file)
@@ -123,30 +123,28 @@ static const char* keyvalue_tostring(lua_State* L, int key_index, int value_inde
 }
 
 /**
- * @brief Dumps the Lua stack if debug logs are enabled.
+ * @brief Dumps the Lua stack for debugging purposes.
  * @param msg a message to print
  * @param L a Lua state
  */
 static void stack_dump(const char* msg, lua_State* L)
 {
-  if (XBT_LOG_ISENABLED(lua, xbt_log_priority_debug)) {
-    char buff[2048];
-    char* p = buff;
-    int i;
-    int top = lua_gettop(L);
+  char buff[2048];
+  char* p = buff;
+  int i;
+  int top = lua_gettop(L);
 
-    //  if (1) return;
+//  if (1) return;
 
-    fflush(stdout);
+  fflush(stdout);
 
-    p[0] = '\0';
-    for (i = 1; i <= top; i++) {  /* repeat for each level */
+  p[0] = '\0';
+  for (i = 1; i <= top; i++) {  /* repeat for each level */
 
-      p += sprintf(p, "%s", value_tostring(L, i));
-      p += sprintf(p, " ");       /* put a separator */
-    }
-    XBT_DEBUG("%s%s", msg, buff);
+    p += sprintf(p, "%s", value_tostring(L, i));
+    p += sprintf(p, " ");       /* put a separator */
   }
+  XBT_INFO("%s%s", msg, buff);
 }
 
 /**