From: dmv Date: Mon, 11 Aug 2008 10:16:41 +0000 (+0000) Subject: Bug IPAL19893 4.x: debug information is in terminal. X-Git-Tag: TG_TRIPOLI_qt4_porting~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1e799d0d91d21cbd06961e6138d41ec4ac66f898;p=modules%2Fkernel.git Bug IPAL19893 4.x: debug information is in terminal. --- diff --git a/src/Launcher/SALOME_LauncherServer.cxx b/src/Launcher/SALOME_LauncherServer.cxx index 5913d0ffb..a79dc3f91 100644 --- a/src/Launcher/SALOME_LauncherServer.cxx +++ b/src/Launcher/SALOME_LauncherServer.cxx @@ -32,7 +32,7 @@ void AttachDebugger() { std::stringstream exec; exec << "$DEBUGGER SALOME_LauncherServer " << getpid() << "&"; - std::cerr << exec.str() << std::endl; + MESSAGE ( exec.str() ); system(exec.str().c_str()); while(1); } @@ -40,13 +40,13 @@ void AttachDebugger() void terminateHandler(void) { - std::cerr << "Terminate: not managed exception !" << std::endl; + MESSAGE ( "Terminate: not managed exception !" ); AttachDebugger(); } void unexpectedHandler(void) { - std::cerr << "Unexpected: unexpected exception !" << std::endl; + MESSAGE ( "Unexpected: unexpected exception !" ); AttachDebugger(); } diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Client.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Client.cxx index 02384368c..525451a00 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Client.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Client.cxx @@ -129,7 +129,7 @@ int main(int argc,char **argv) } catch(SALOME_ModuleCatalog::NotFound &ex){ INFOS("SALOME_ModuleCatalog::NotFound") - cerr << ex.what << endl; + MESSAGE ( ex.what ); } catch(CORBA::SystemException&) { INFOS("Caught CORBA::SystemException.") diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx index 88fd5e7bc..4fa0eacad 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx @@ -237,10 +237,10 @@ void SALOME_ModuleCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc) _typeList.push_back(aType); } else - std::cerr << "Warning: this type (" << aType.name << "," << aType.kind << ") already exists, it will be ignored." << std::endl; + MESSAGE ( "Warning: this type (" << aType.name << "," << aType.kind << ") already exists, it will be ignored." ); } else - std::cerr << "Warning: this type (" << aType.name << "," << aType.kind << ") has incorrect kind, it will be ignored." << std::endl; + MESSAGE ( "Warning: this type (" << aType.name << "," << aType.kind << ") has incorrect kind, it will be ignored." ); } else if ( !xmlStrcmp(aTypeNode->name, (const xmlChar*)"sequence" )) { @@ -267,11 +267,11 @@ void SALOME_ModuleCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc) _typeList.push_back(aType); } else - std::cerr << "Warning: this type (" << aType.name << "," << aType.kind << ") already exists, it will be ignored." << std::endl; + MESSAGE ( "Warning: this type (" << aType.name << "," << aType.kind << ") already exists, it will be ignored." ); } else { - std::cerr << "Warning: this sequence type (" << aType.name << "," << aType.content << ") has unknown content type, it will be ignored." << std::endl; + MESSAGE ( "Warning: this sequence type (" << aType.name << "," << aType.content << ") has unknown content type, it will be ignored." ); } } else if ( !xmlStrcmp(aTypeNode->name, (const xmlChar*)"objref" )) @@ -309,7 +309,7 @@ void SALOME_ModuleCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc) } else { - std::cerr << "Warning: this objref type (" << aType.name << ") has unknown base type (" << base << "), it will be ignored." << std::endl; + MESSAGE ( "Warning: this objref type (" << aType.name << ") has unknown base type (" << base << "), it will be ignored." ); error=1; break; } @@ -326,7 +326,7 @@ void SALOME_ModuleCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc) _typeList.push_back(aType); } else - std::cerr << "Warning: this type (" << aType.name << "," << aType.kind << ") already exists, it will be ignored." << std::endl; + MESSAGE ( "Warning: this type (" << aType.name << "," << aType.kind << ") already exists, it will be ignored." ); } } else if ( !xmlStrcmp(aTypeNode->name, (const xmlChar*)"struct" )) @@ -371,7 +371,7 @@ void SALOME_ModuleCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc) } else { - std::cerr << "Warning: this struct type (" << aType.name << ") has unknown member type (" << member.first << "," << member.second << "), it will be ignored." << std::endl; + MESSAGE ( "Warning: this struct type (" << aType.name << ") has unknown member type (" << member.first << "," << member.second << "), it will be ignored." ); error=1; break; } @@ -387,7 +387,7 @@ void SALOME_ModuleCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc) _typeList.push_back(aType); } else - std::cerr << "Warning: this type (" << aType.name << "," << aType.kind << ") already exists, it will be ignored." << std::endl; + MESSAGE ( "Warning: this type (" << aType.name << "," << aType.kind << ") already exists, it will be ignored." ); } } // end of struct aTypeNode = aTypeNode->next; diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx index 892b2fbb8..55e1c0040 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx @@ -161,7 +161,7 @@ int main(int argc,char **argv) timer.ShowAbsolute(); #endif orb->run(); - std::cerr << "server returned from orb->run()" << std::endl; + MESSAGE ( "server returned from orb->run()" ); orb->destroy(); // mgr->deactivate(true,true); diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx index 34b01260b..01434b1a9 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx @@ -30,16 +30,14 @@ #include "SALOME_ModuleCatalog_Acomponent_impl.hxx" #include #include +#include "utilities.h" #ifdef WIN32 # include #endif - using namespace std; -#include "utilities.h" - #ifdef _DEBUG_ static int MYDEBUG = 0; #else @@ -698,14 +696,14 @@ SALOME_ModuleCatalogImpl::_parse_xml_file(const char* file, if (aDoc != NULL) handler->ProcessXmlDocument(aDoc); else - INFOS("ModuleCatalog: could not parse file "< #include +#include "utilities.h" + using namespace std; //#define _DEVDEBUG_ @@ -106,7 +108,7 @@ void* FileTraceCollector::run(void *bid) traceFile.open(theFileName, ios::out | ios::app); if (!traceFile) { - cerr << "impossible to open trace file "<< theFileName << endl; + MESSAGE ( "impossible to open trace file "<< theFileName ); exit (1); } @@ -135,11 +137,11 @@ void* FileTraceCollector::run(void *bid) traceFile.close(); cout << flush ; #ifndef WNT - cerr << "INTERRUPTION from thread " << myTrace.threadId - << " : " << myTrace.trace; + MESSAGE ( "INTERRUPTION from thread " << myTrace.threadId + << " : " << myTrace.trace ); #else - cerr << "INTERRUPTION from thread " << (void*)(&myTrace.threadId) - << " : " << myTrace.trace; + MESSAGE ( "INTERRUPTION from thread " << (void*)(&myTrace.threadId) + << " : " << myTrace.trace ); #endif cerr << flush ; exit(1); diff --git a/src/SALOMELocalTrace/LocalTraceBufferPool.cxx b/src/SALOMELocalTrace/LocalTraceBufferPool.cxx index a840d3f4a..4ab542290 100644 --- a/src/SALOMELocalTrace/LocalTraceBufferPool.cxx +++ b/src/SALOMELocalTrace/LocalTraceBufferPool.cxx @@ -132,9 +132,9 @@ LocalTraceBufferPool* LocalTraceBufferPool::instance() #endif if ( !TraceCollectorFactory ) { - cerr << "Can't resolve symbol: SingletonInstance" < #include #include +#include "utilities.h" using namespace std; @@ -102,11 +103,11 @@ void* LocalTraceCollector::run(void *bid) { cout << flush ; #ifndef WNT - cerr << "INTERRUPTION from thread " << myTrace.threadId - << " : " << myTrace.trace; + MESSAGE ( "INTERRUPTION from thread " << myTrace.threadId + << " : " << myTrace.trace ); #else - cerr << "INTERRUPTION from thread " << (void*)(&myTrace.threadId) - << " : " << myTrace.trace; + MESSAGE ( "INTERRUPTION from thread " << (void*)(&myTrace.threadId) + << " : " << myTrace.trace ); #endif cerr << flush ; exit(1); @@ -115,10 +116,9 @@ void* LocalTraceCollector::run(void *bid) { cout << flush ; #ifndef WNT - cerr << "th. " << myTrace.threadId << " " << myTrace.trace; + MESSAGE ( "th. " << myTrace.threadId << " " << myTrace.trace ); #else - cerr << "th. " << (void*)(&myTrace.threadId) - << " " << myTrace.trace; + MESSAGE ( "th. " << (void*)(&myTrace.threadId) << " " << myTrace.trace ); #endif cerr << flush ; } @@ -146,7 +146,7 @@ LocalTraceCollector:: ~LocalTraceCollector() if (_threadId) { int ret = pthread_join(*_threadId, NULL); - if (ret) cerr << "error close LocalTraceCollector : "<< ret << endl; + if (ret) { MESSAGE ( "error close LocalTraceCollector : " << ret ); } else DEVTRACE("LocalTraceCollector destruction OK"); delete _threadId; _threadId = 0;