Salome HOME
[bos #32517][EDF] Dynamic log messages switched on and off by SALOME_VERBOSE environm...
[modules/smesh.git] / src / SMESH_I / SMESH_PythonDump.cxx
index 01ed1386a5639d83679e58a76e803cf3ce407fcd..798b2a3fe722aee0164ab51881443b8a6177884f 100644 (file)
 
 #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;
   }
 
 //=======================================================================