Salome HOME
[bos #32517][EDF] Dynamic logging: Removed some of _DEBUG_ entries.
[modules/smesh.git] / src / SMESH_I / SMESH_PythonDump.cxx
index 5a92bde8242a3d3acbf740d8ca4a4f065d29c2c3..798b2a3fe722aee0164ab51881443b8a6177884f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 
 #include <cstring>
 
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
 #include "SMESH_TryCatch.hxx"
 
 namespace SMESH
@@ -92,7 +86,7 @@ namespace SMESH
         if ( !objEntry.empty() )
           aCollection += (TVar::ObjPrefix() + objEntry ).c_str();
         aSMESHGen->AddToPythonScript(aCollection);
-        if(MYDEBUG) MESSAGE(aString);
+        MESSAGE(aString);
         // prevent misuse of already treated variables
         aSMESHGen->UpdateParameters(CORBA::Object_var().in(),"");
       }
@@ -693,11 +687,8 @@ namespace SMESH
 
   void printException( const char* text )
   {
-#ifdef _DEBUG_
-    std::cout << "Exception in SMESH_Gen_i::DumpPython(): " << text << std::endl;
-#else
-    (void)text; // unused in release mode
-#endif
+    if (SALOME::VerbosityActivated())
+      std::cout << "Exception in SMESH_Gen_i::DumpPython(): " << text << std::endl;
   }
 
 //=======================================================================