]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fix for '[CEA 17019] mg-tetra.exe command line in console not printed correctly'...
authorrnv <rnv@opencascade.com>
Mon, 9 Dec 2019 17:24:58 +0000 (20:24 +0300)
committerrnv <rnv@opencascade.com>
Mon, 9 Dec 2019 17:24:58 +0000 (20:24 +0300)
src/SALOMELocalTrace/LocalTraceBufferPool.hxx
src/SALOMELocalTrace/LocalTraceCollector.cxx
src/SALOMELocalTrace/utilities.h

index 021d38b2b4dbe224b0185c6c1c04e3e76e7b8217..98d87e692ebd16be6a14e9cafaea0192c57f2441 100644 (file)
@@ -41,6 +41,7 @@
 #include "BaseTraceCollector.hxx"
 #include "BasicsGenericDestructor.hxx"
 
+#define BRIEF_MESS  2
 #define ABORT_MESS  1   // for traceType field in struct LocalTrace_TraceInfo
 #define NORMAL_MESS 0
 
index 1d4d228a6e821c37a744d2c61e699fc4bbc831aa..109c3305bfc3d8c44ac029a515ad4f70bce2c75e 100644 (file)
@@ -110,7 +110,7 @@ void* LocalTraceCollector::run(void *bid)
           std::cerr << std::flush ; 
           exit(1);     
         }
-      else
+      else if (myTrace.traceType == NORMAL_MESS)
         {
           std::cout << std::flush ;
 #ifndef WIN32
@@ -118,6 +118,16 @@ void* LocalTraceCollector::run(void *bid)
 #else
           std::cerr << "th. " << (void*)(&myTrace.threadId)
                << " " << myTrace.trace;
+#endif
+          std::cerr << std::flush ; 
+        }
+      else 
+        {
+          std::cout << std::flush ;
+#ifndef WIN32
+          std::cerr << myTrace.trace;
+#else
+          std::cerr << myTrace.trace;
 #endif
           std::cerr << std::flush ; 
         }
index 2e42d9cbc4ebc5831e28eec87be491c3aef26176..5fc21e402e9c5b542227a61bfa36c2b300157183 100644 (file)
@@ -63,6 +63,7 @@
 // --- Some macros are always defined (without _DEBUG_): for use with release version
 
 #define INFOS(msg) {MESS_BEGIN("- Trace ") << msg << MESS_END}
+#define BRIEF_INFOS(msg) {std::ostringstream os; os<< msg << std::endl; LocalTraceBufferPool::instance()->insert(BRIEF_MESS, os.str().c_str());}
 #define PYSCRIPT(msg) {MESS_INIT("---PYSCRIPT--- ") << msg << MESS_END}
 #define INTERRUPTION(msg) {MESS_BEGIN("- INTERRUPTION: ")<< msg << MESS_ABORT}