]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Remove useless MESSAGEs
authoreap <eap@opencascade.com>
Fri, 13 Jan 2017 10:55:59 +0000 (13:55 +0300)
committereap <eap@opencascade.com>
Fri, 13 Jan 2017 10:55:59 +0000 (13:55 +0300)
src/Container/SALOME_ContainerManager.cxx
src/Launcher/Launcher_Job.cxx
src/Launcher/Launcher_Utils.hxx
src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx
src/NamingService/SALOME_NamingService.cxx
src/ResourcesManager/ResourcesManager_Defs.hxx

index 676adc8e34b03a7cc0252c8db70bb569ca399233..cb8e76656645ad6af343b558eabc939e583a340c 100644 (file)
@@ -757,7 +757,7 @@ SALOME_ContainerManager::BuildCommandToLaunchRemoteContainer(const std::string&
         nbproc = params.nb_proc;
     }
 
-    // "ssh -l user machine distantPath/runRemote.sh hostNS portNS WORKINGDIR workingdir \
+    // "ssh -l user machine distantPath/runRemote.sh hostNS portNS WORKINGDIR workingdir
     //  SALOME_Container containerName &"
     command = getCommandToRunRemoteProcess(resInfo.Protocol, resInfo.HostName, resInfo.UserName);
 
index bd574094fbbfd79d41a8e28ce2613141d6a51a36..c52363bce918218c3b65c3333a1b799ebc7b3d8e 100644 (file)
@@ -518,7 +518,7 @@ Launcher::Job::getLaunchDate() const
   time_t rawtime;
   time(&rawtime);
   std::string launch_date = ctime(&rawtime);
-  int i = 0 ;
+  size_t i = 0 ;
   for (;i < launch_date.size(); i++)
     if (launch_date[i] == '/' ||
         launch_date[i] == '-' ||
index 8ad3d170582d97480a56510a9f292ac298eb3a94..54981f4c28bcb2bcc4e7a1fe538d1824100cf997 100644 (file)
 # define LAUNCHER_EXPORT
 #endif
 
+#if defined(_DEBUG_) || defined(_DEBUG)
+//#define LAUNCHER_DEGBUG
+#endif
+
 // MESSAGES
 #define LAUNCHER_MESS_INIT(deb) std::cerr << deb
 #define LAUNCHER_MESS_BEGIN(deb) LAUNCHER_MESS_INIT(deb)<<__FILE__ <<" ["<<__LINE__<<"] : "
 #define LAUNCHER_MESS_END std::endl;
 #define LAUNCHER_INFOS(msg) {LAUNCHER_MESS_BEGIN("- Trace ") << msg << LAUNCHER_MESS_END}
 
-#if defined(_DEBUG_) || defined(_DEBUG)
+#if defined(LAUNCHER_DEGBUG)
 #define LAUNCHER_MESSAGE(msg) {LAUNCHER_MESS_BEGIN("- Trace ") << msg << LAUNCHER_MESS_END}
-#else /* ifdef _DEBUG_*/
+#else /* ifdef LAUNCHER_DEGBUG*/
 #define LAUNCHER_MESSAGE(msg) {}
-#endif /* ifdef _DEBUG_*/
+#endif /* ifdef LAUNCHER_DEGBUG*/
 
 class LAUNCHER_EXPORT LauncherException
 {
index 32f628deee0296499bcdf95deafd96e0ff680911..693ec8b439c5097a7c62b4d566f14d0a63c85d51 100644 (file)
@@ -320,7 +320,7 @@ void SALOME_ModuleCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc)
                   {
                     if ( _typeMap.find(aType.name) == _typeMap.end() )
                       {
-                        MESSAGE("Registered objref type: " << aType.name << " " << aType.id );
+                        //MESSAGE("Registered objref type: " << aType.name << " " << aType.id );
                         _typeMap[aType.name]=aType;
                         _typeList.push_back(aType);
                       }
index fb1beb6710f924e3b714aa8f51545dda3ce80913..98d27c9f3c9ff1b050902ec94ce1529319a240a2 100644 (file)
@@ -55,7 +55,6 @@
 
 SALOME_NamingService::SALOME_NamingService()
 {
-  MESSAGE("SALOME_NamingService default constructor");
   _orb = CORBA::ORB::_nil();
   _root_context = CosNaming::NamingContext::_nil();
 }
@@ -70,7 +69,6 @@ SALOME_NamingService::SALOME_NamingService()
 
 SALOME_NamingService::SALOME_NamingService(CORBA::ORB_ptr orb)
 {
-  MESSAGE("SALOME_NamingService creation");
   _orb = CORBA::ORB::_duplicate(orb);
   _initialize_root_context();
 }
@@ -101,8 +99,6 @@ SALOME_NamingService::~SALOME_NamingService()
 
 void SALOME_NamingService::init_orb(CORBA::ORB_ptr orb)
 {
-  MESSAGE("SALOME_NamingService initialisation");
-
   Utils_Locker lock (&_myMutex);
   if(orb)
     _orb = CORBA::ORB::_duplicate(orb);
@@ -140,8 +136,6 @@ void SALOME_NamingService::Register(CORBA::Object_ptr ObjRef,
                                     const char* Path)
   throw(ServiceUnreachable)
 {
-  MESSAGE("BEGIN OF Register: " << Path);
-
   Utils_Locker lock (&_myMutex);
 
   // --- _current_context is replaced to the _root_context
@@ -337,8 +331,6 @@ void SALOME_NamingService::Register(CORBA::Object_ptr ObjRef,
 CORBA::Object_ptr SALOME_NamingService::Resolve(const char* Path)
   throw(ServiceUnreachable)
 {
-//   MESSAGE("BEGIN OF Resolve: " << Path);
-
   Utils_Locker lock (&_myMutex);
 
   // --- _current_context is replaced to the _root_context
@@ -423,10 +415,7 @@ CORBA::Object_ptr SALOME_NamingService::Resolve(const char* Path)
 CORBA::Object_ptr SALOME_NamingService::ResolveFirst(const char* Path)
   throw(ServiceUnreachable)
 {
-//   MESSAGE("ResolveFirst");
-
   Utils_Locker lock (&_myMutex);
-//   SCRUTE(Path);
 
   std::string thePath = Path;
   std::string basePath = "";
@@ -457,8 +446,6 @@ CORBA::Object_ptr SALOME_NamingService::ResolveFirst(const char* Path)
       
       while (its != listElem.end())
         {
-          MESSAGE(*its);
-          
           if ((*its).find(name) == 0)
             {
               return Resolve((*its).c_str());
@@ -496,8 +483,6 @@ SALOME_NamingService::ResolveComponent(const char* hostname,
                                        const int nbproc)
   throw(ServiceUnreachable)
 {
-//   MESSAGE("ResolveComponent");
-
   Utils_Locker lock (&_myMutex);
 
   std::string name = "/Containers/";
@@ -614,8 +599,8 @@ std::string SALOME_NamingService::ContainerName(const Engines::ContainerParamete
 
   if ( nbproc >= 1 )
     {
-         std::ostringstream suffix;
-         suffix << "_" << nbproc;
+          std::ostringstream suffix;
+          suffix << "_" << nbproc;
       ret += suffix.str();
     }
 
@@ -685,8 +670,6 @@ std::string SALOME_NamingService::BuildContainerNameForNS(const Engines::Contain
 int SALOME_NamingService::Find(const char* name)
 throw(ServiceUnreachable)
 {
-  MESSAGE("BEGIN OF Find " << name);
-
   Utils_Locker lock (&_myMutex);
 
   CORBA::Long occurence_number = 0 ;
@@ -729,8 +712,6 @@ throw(ServiceUnreachable)
 
 bool SALOME_NamingService::Create_Directory(const char* Path) throw(ServiceUnreachable)
 {
-  MESSAGE("BEGIN OF Create_Directory");
-
   Utils_Locker lock (&_myMutex);
 
   std::string path(Path);
@@ -744,7 +725,6 @@ bool SALOME_NamingService::Create_Directory(const char* Path) throw(ServiceUnrea
 
   if (path == "/")
     {
-      MESSAGE("Create Directory '/', just change to root_context");
       _current_context = _root_context;
       return true;
     }
@@ -773,7 +753,6 @@ bool SALOME_NamingService::Create_Directory(const char* Path) throw(ServiceUnrea
 
 bool SALOME_NamingService::Change_Directory(const char* Path) throw(ServiceUnreachable)
 {
-//   MESSAGE("BEGIN OF Change_Directory " << Path);
   Utils_Locker lock (&_myMutex);
 
   std::string path(Path);
@@ -787,7 +766,6 @@ bool SALOME_NamingService::Change_Directory(const char* Path) throw(ServiceUnrea
 
   if (path == "/")
     {
-//       MESSAGE("Change_Directory is called to go to the root_context");
       _current_context = _root_context;
       return true;
     }
@@ -873,8 +851,6 @@ bool SALOME_NamingService::Change_Directory(const char* Path) throw(ServiceUnrea
 
 char *SALOME_NamingService::Current_Directory() throw(ServiceUnreachable)
 {
-  MESSAGE("BEGIN OF Current_Directory");
-
   Utils_Locker lock (&_myMutex);
 
   CosNaming::NamingContext_var ref_context = _current_context;
@@ -925,8 +901,6 @@ char *SALOME_NamingService::Current_Directory() throw(ServiceUnreachable)
 
 void SALOME_NamingService::list() throw(ServiceUnreachable)
 {
-  MESSAGE("Begin of list");
-
   Utils_Locker lock (&_myMutex)
 
     ;
@@ -949,8 +923,6 @@ void SALOME_NamingService::list() throw(ServiceUnreachable)
 
           if (binding->binding_type == CosNaming::ncontext)
             {
-              MESSAGE( "Context : " << bindingName[0].id );
-
               try
                 {
                   Change_Directory(bindingName[0].id);
@@ -968,7 +940,7 @@ void SALOME_NamingService::list() throw(ServiceUnreachable)
 
           else if (binding->binding_type == CosNaming::nobject)
             {
-              MESSAGE( "Object : " << bindingName[0].id );
+              MESSAGE( "list(): no Object : " << bindingName[0].id );
             }
         }
 
@@ -989,7 +961,6 @@ void SALOME_NamingService::list() throw(ServiceUnreachable)
 
 std::vector<std::string> SALOME_NamingService::list_directory() throw(ServiceUnreachable)
 {
-//   MESSAGE("list_directory");
   Utils_Locker lock (&_myMutex);
   std::vector<std::string> dirList ;
   dirList.resize(0);
@@ -1043,7 +1014,6 @@ std::vector<std::string> SALOME_NamingService::list_directory() throw(ServiceUnr
 
 std::vector<std::string> SALOME_NamingService::list_subdirs() throw(ServiceUnreachable)
 {
-  MESSAGE("list_subdirs");
   Utils_Locker lock (&_myMutex);
   std::vector<std::string> dirList ;
   dirList.resize(0);
@@ -1072,8 +1042,8 @@ std::vector<std::string> SALOME_NamingService::list_subdirs() throw(ServiceUnrea
         }
     }
 
-  for (unsigned int ind = 0; ind < dirList.size(); ind++)
-    MESSAGE("list_directory : Object : " << dirList[ind]);
+  // for (unsigned int ind = 0; ind < dirList.size(); ind++)
+  //   MESSAGE("list_directory : Object : " << dirList[ind]);
 
   binding_iterator->destroy();
 
@@ -1094,8 +1064,6 @@ std::vector<std::string> SALOME_NamingService::list_subdirs() throw(ServiceUnrea
 std::vector<std::string> SALOME_NamingService::list_directory_recurs()
 throw(ServiceUnreachable)
 {
-  MESSAGE("list_directory_recurs");
-
   Utils_Locker lock (&_myMutex);
 
   std::vector<std::string> dirList ;
@@ -1121,8 +1089,6 @@ throw(ServiceUnreachable)
 void SALOME_NamingService::Destroy_Name(const char* Path)
 throw(ServiceUnreachable)
 {
-  MESSAGE("BEGIN OF Destroy_Name " << Path);
-
   Utils_Locker lock (&_myMutex);
 
   std::string path(Path);
@@ -1223,10 +1189,10 @@ throw(ServiceUnreachable)
           context_name[0].id =
             CORBA::string_dup(splitPath[dimension_resultat].c_str());
           context_name[0].kind = CORBA::string_dup("object");
-          SCRUTE(context_name[0].id);
+          //SCRUTE(context_name[0].id);
  
           _current_context->unbind(context_name);
-          MESSAGE("The object " << context_name[0].id << " has been deleted");
+          //MESSAGE("The object " << context_name[0].id << " has been deleted");
         }
 
       catch (CosNaming::NamingContext::NotFound& ex)
@@ -1276,8 +1242,6 @@ throw(ServiceUnreachable)
 
 void SALOME_NamingService::Destroy_Directory(const char* Path) throw(ServiceUnreachable)
 {
-  MESSAGE("BEGIN OF Destroy_Directory " << Path);
-
   Utils_Locker lock (&_myMutex);
 
   std::string path(Path);
@@ -1369,7 +1333,6 @@ void SALOME_NamingService::Destroy_Directory(const char* Path) throw(ServiceUnre
   try
     {
       _current_context->destroy();
-      MESSAGE( "The context " << path << " has been deleted" );
       isContextDestroyed = true;
     }
 
@@ -1397,9 +1360,6 @@ void SALOME_NamingService::Destroy_Directory(const char* Path) throw(ServiceUnre
       try
         {
           _current_context->unbind(context_name);
-          MESSAGE( "The bind to the context "
-                   << context_name[0].id
-                   << " has been deleted" );
         }
 
       catch (CosNaming::NamingContext::NotFound& ex)
@@ -1450,7 +1410,6 @@ void SALOME_NamingService::Destroy_Directory(const char* Path) throw(ServiceUnre
 
 void SALOME_NamingService::Destroy_FullDirectory(const char* Path) throw(ServiceUnreachable)
 {
-  MESSAGE("begin of Destroy_FullDirectory " << Path);
   //no need to lock here because method calls are threadsafe.
   if( Change_Directory(Path) )
     {
@@ -1473,7 +1432,6 @@ void SALOME_NamingService::Destroy_FullDirectory(const char* Path) throw(Service
 
 void SALOME_NamingService::_initialize_root_context()
 {
-  //MESSAGE("Get the root context");
   //no lock here because initialization is expected to be done once.
   try
     {
@@ -1588,8 +1546,6 @@ SALOME_NamingService::_createContextNameDir(std::string path,
 void SALOME_NamingService::_Find(const char* name,
                                  CORBA::Long& occurence_number)
 {
-  MESSAGE("BEGIN OF _Find "<<  occurence_number << " " << name);
-
   CosNaming::BindingList_var binding_list;
   CosNaming::BindingIterator_var binding_iterator;
   CosNaming::Binding_var binding;
@@ -1666,8 +1622,6 @@ _current_directory(std::vector<std::string>& splitPath,
                    CosNaming::NamingContext_var contextToFind,
                    bool& notFound)
 {
-  MESSAGE("BEGIN OF _current_Directory");
-
   CosNaming::BindingList_var binding_list;
   CosNaming::BindingIterator_var binding_iterator;
   CosNaming::Binding_var binding;
@@ -1699,14 +1653,14 @@ _current_directory(std::vector<std::string>& splitPath,
 
               if (temp_context->_is_equivalent(contextToFind))
                 {
-                  MESSAGE("The context is found, we stop the search");
+                  //MESSAGE("The context is found, we stop the search");
                   notFound = false;
-                  SCRUTE(notFound);
+                  //SCRUTE(notFound);
                 }
 
               if (notFound)
                 {
-                  SCRUTE(bindingName[0].id);
+                  //SCRUTE(bindingName[0].id);
                   Change_Directory(bindingName[0].id);
                   _current_directory(splitPath,
                                      lengthResult,
@@ -1719,8 +1673,8 @@ _current_directory(std::vector<std::string>& splitPath,
 
                       _current_context = ref_context;
 
-                      MESSAGE("Just before the delete of "
-                              << splitPath[lengthResult-1]);
+                      // MESSAGE("Just before the delete of "
+                      //         << splitPath[lengthResult-1]);
                       splitPath.pop_back();
                       lengthResult--;
                     }
index cc1129b39cf692708cf477a1fca0605fbc7bd539..a7ab95467a0f9b1c3cde9036cfce4b5b7a0a848e 100755 (executable)
 #endif
 
 // MESSAGES
-#define RES_MESS_INIT(deb) std::cerr << deb
-#define RES_MESS_BEGIN(deb) RES_MESS_INIT(deb)<<__FILE__ <<" ["<<__LINE__<<"] : "
-#define RES_MESS_END std::endl;
-#define RES_INFOS(msg) {RES_MESS_BEGIN("- Trace ") << msg << RES_MESS_END}
+#define RES_MESS_INIT(deb) //std::cerr << deb
+#define RES_MESS_BEGIN(deb) //RES_MESS_INIT(deb)<<__FILE__ <<" ["<<__LINE__<<"] : "
+#define RES_MESS_END //std::endl;
+#define RES_INFOS(msg) {}//{RES_MESS_BEGIN("- Trace ") << msg << RES_MESS_END}
 
 #if defined(_DEBUG_) || defined(_DEBUG)
+//#define __RES_DEGBUG
+#endif
+
+#if defined(__RES_DEGBUG)
 #define RES_MESSAGE(msg) {RES_MESS_BEGIN("- Trace ") << msg << RES_MESS_END}
-#else /* ifdef _DEBUG_*/
+#else /* ifdef __RES_DEGBUG*/
 #define RES_MESSAGE(msg) {}
-#endif /* ifdef _DEBUG_*/
+#endif /* ifdef __RES_DEGBUG*/
 
 #endif // __RESOURCESMANAGER_DEFS_HXX__