Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Replace usage of "printf" by a logger.
[simgrid.git] / src / smpi / smpi_replay_main.cpp
index 2404541..f12a751 100644 (file)
@@ -4,16 +4,18 @@
 #include "xbt/replay.hpp"
 #include "xbt/str.h"
 
+XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_replay);
+
 int main(int argc, char* argv[])
 {
   if (simgrid::s4u::Actor::self() == nullptr) {
-    printf("smpireplaymain should not be called directly. Please use smpirun -replay instead.\n");
+    XBT_ERROR("smpireplaymain should not be called directly. Please use smpirun -replay instead.");
     return 1;
   }
 
   auto properties = simgrid::s4u::Actor::self()->get_properties();
   if (properties->find("smpi_replay") == properties->end()) {
-    printf("invalid smpireplaymain execution. Please use smpirun -replay instead.\n");
+    XBT_ERROR("invalid smpireplaymain execution. Please use smpirun -replay instead.");
     return 1;
   }