From 46e15b257d44d189f64ef12f95274e903fe0b679 Mon Sep 17 00:00:00 2001 From: rnv Date: Mon, 9 Dec 2019 20:24:58 +0300 Subject: [PATCH] Fix for '[CEA 17019] mg-tetra.exe command line in console not printed correctly' issue. --- src/SALOMELocalTrace/LocalTraceBufferPool.hxx | 1 + src/SALOMELocalTrace/LocalTraceCollector.cxx | 12 +++++++++++- src/SALOMELocalTrace/utilities.h | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) 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} -- 2.39.2