Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[xbt] Kill the queue datacontainer: it made more sense with GRAS
[simgrid.git] / src / xbt / log.c
index 7cde20d..47ff21a 100644 (file)
@@ -1,6 +1,6 @@
 /* log - a generic logging facility in the spirit of log4j                  */
 
-/* Copyright (c) 2004-2014. The SimGrid Team.
+/* Copyright (c) 2004-2015. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 #include <stdio.h>              /* snprintf */
 #include <stdlib.h>             /* snprintf */
 
-#include "portable.h"           /* to get a working stdarg.h */
+#include "src/portable.h"           /* to get a working stdarg.h */
 
-#include "xbt_modinter.h"
+#include "src/xbt_modinter.h"
 
 #include "xbt/misc.h"
 #include "xbt/ex.h"
 #include "xbt/str.h"
 #include "xbt/sysdep.h"
-#include "xbt/log_private.h"
+#include "src/xbt/log_private.h"
 #include "xbt/dynar.h"
 #include "xbt/xbt_os_thread.h"
 
@@ -584,7 +584,6 @@ static void xbt_log_connect_categories(void)
   XBT_LOG_CONNECT(xbt_mallocator);
   XBT_LOG_CONNECT(xbt_matrix);
   XBT_LOG_CONNECT(xbt_parmap);
-  XBT_LOG_CONNECT(xbt_queue);
   XBT_LOG_CONNECT(xbt_set);
   XBT_LOG_CONNECT(xbt_sync);
   XBT_LOG_CONNECT(xbt_sync_os);
@@ -596,13 +595,9 @@ static void xbt_log_connect_categories(void)
 #ifdef HAVE_LUA
   XBT_LOG_CONNECT(bindings);
   XBT_LOG_CONNECT(lua);
-  XBT_LOG_CONNECT(lua_comm);
   XBT_LOG_CONNECT(lua_host);
   XBT_LOG_CONNECT(lua_platf);
-  XBT_LOG_CONNECT(lua_process);
-  XBT_LOG_CONNECT(lua_state_cloner);
-  XBT_LOG_CONNECT(lua_task);
-  XBT_LOG_CONNECT(lua_utils);
+  XBT_LOG_CONNECT(lua_debug);
 #endif
 
   /* instr */
@@ -641,10 +636,8 @@ static void xbt_log_connect_categories(void)
   XBT_LOG_CONNECT(mc_dwarf);
   XBT_LOG_CONNECT(mc_hash);
   XBT_LOG_CONNECT(mc_ignore);
-  XBT_LOG_CONNECT(mcer_ignore);
   XBT_LOG_CONNECT(mc_liveness);
   XBT_LOG_CONNECT(mc_memory);
-  XBT_LOG_CONNECT(mc_memory_map);
   XBT_LOG_CONNECT(mc_page_snapshot);
   XBT_LOG_CONNECT(mc_request);
   XBT_LOG_CONNECT(mc_safety);
@@ -654,7 +647,8 @@ static void xbt_log_connect_categories(void)
   XBT_LOG_CONNECT(mc_comm_pattern);
   XBT_LOG_CONNECT(mc_process);
   XBT_LOG_CONNECT(mc_protocol);
-  XBT_LOG_CONNECT(mc_server);
+  XBT_LOG_CONNECT(mc_RegionSnaphot);
+  XBT_LOG_CONNECT(mc_ModelChecker);
   XBT_LOG_CONNECT(mc_state);
 #endif
   XBT_LOG_CONNECT(mc_global);
@@ -714,16 +708,8 @@ static void xbt_log_connect_categories(void)
   XBT_LOG_CONNECT(surf_lagrange_dichotomy);
   XBT_LOG_CONNECT(surf_maxmin);
   XBT_LOG_CONNECT(surf_network);
-#ifdef HAVE_GTNETS
-  XBT_LOG_CONNECT(surf_network_gtnets);
-  XBT_LOG_CONNECT(surf_network_gtnets_interface);
-  XBT_LOG_CONNECT(surf_network_gtnets_simulator);
-  XBT_LOG_CONNECT(surf_network_gtnets_topology);
-#endif
 #ifdef HAVE_NS3
-  XBT_LOG_CONNECT(surf_network_ns3);
-  XBT_LOG_CONNECT(interface_ns3);
-  XBT_LOG_CONNECT(simulator_ns3);
+  XBT_LOG_CONNECT(ns3);
 #endif
   XBT_LOG_CONNECT(surf_parse);
   XBT_LOG_CONNECT(surf_route);
@@ -738,8 +724,8 @@ static void xbt_log_connect_categories(void)
   XBT_LOG_CONNECT(surf_route_vivaldi);
   XBT_LOG_CONNECT(surf_storage);
   XBT_LOG_CONNECT(surf_trace);
-  XBT_LOG_CONNECT(surf_vm_workstation);
-  XBT_LOG_CONNECT(surf_workstation);
+  XBT_LOG_CONNECT(surf_vm);
+  XBT_LOG_CONNECT(surf_host);
 
 #endif /* simgrid_EXPORTS */
 }
@@ -1137,9 +1123,12 @@ static xbt_log_setting_t _xbt_log_parse_setting(const char *control_string)
     }
 
     if(i<XBT_LOG_STATIC_THRESHOLD){
-     THROWF(arg_error, 0,
-             "Priority: %s is above allowed priority : %s (for debug and trace levels, recompile SimGrid with -Denable_debug=ON)",
-             eq + 1, xbt_log_priority_names[XBT_LOG_STATIC_THRESHOLD]);
+     fprintf(stderr,
+                "Priority '%s' (in setting '%s') is above allowed priority '%s'.\n\n"
+                "Compiling SimGrid with -DNDEBUG forbids the levels 'trace' and 'debug'\n"
+                "while -DNLOG forbids any logging, at any level.",
+             eq + 1, name, xbt_log_priority_names[XBT_LOG_STATIC_THRESHOLD]);
+     exit(1);
     }else if (i < xbt_log_priority_infinite) {
       set->thresh = (e_xbt_log_priority_t) i;
     } else {