From: rnv Date: Mon, 9 Dec 2019 17:24:58 +0000 (+0300) Subject: Fix for '[CEA 17019] mg-tetra.exe command line in console not printed correctly'... X-Git-Tag: EMC2P_V_1_2_0~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=46e15b257d44d189f64ef12f95274e903fe0b679;p=modules%2Fkernel.git Fix for '[CEA 17019] mg-tetra.exe command line in console not printed correctly' issue. --- diff --git a/src/SALOMELocalTrace/LocalTraceBufferPool.hxx b/src/SALOMELocalTrace/LocalTraceBufferPool.hxx index 021d38b2b..98d87e692 100644 --- a/src/SALOMELocalTrace/LocalTraceBufferPool.hxx +++ b/src/SALOMELocalTrace/LocalTraceBufferPool.hxx @@ -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 diff --git a/src/SALOMELocalTrace/LocalTraceCollector.cxx b/src/SALOMELocalTrace/LocalTraceCollector.cxx index 1d4d228a6..109c3305b 100644 --- a/src/SALOMELocalTrace/LocalTraceCollector.cxx +++ b/src/SALOMELocalTrace/LocalTraceCollector.cxx @@ -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 ; } diff --git a/src/SALOMELocalTrace/utilities.h b/src/SALOMELocalTrace/utilities.h index 2e42d9cbc..5fc21e402 100644 --- a/src/SALOMELocalTrace/utilities.h +++ b/src/SALOMELocalTrace/utilities.h @@ -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}