From a0570677a1250208d2495a2b2fe95dac3d499f17 Mon Sep 17 00:00:00 2001 From: akl Date: Thu, 11 Jul 2013 10:21:33 +0000 Subject: [PATCH] Additional fix for 0022170: [CEA 704] Redirect NETGEN outup in a log file: standard error stream of 'netgen' is redirected to the same temporary file as standard output stream. --- src/NETGENPlugin/NETGENPlugin_Mesher.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx index f44be94..4b8e679 100644 --- a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx @@ -3463,7 +3463,8 @@ NETGENPlugin_NetgenLibWrapper::NETGENPlugin_NetgenLibWrapper() _isComputeOk = false; _outputFileName = getOutputFileName(); netgen::mycout = new ofstream ( _outputFileName.c_str() ); - cout << "NOTE: netgen output redirected to file " << _outputFileName << endl; + netgen::myerr = netgen::mycout; + cout << "NOTE: netgen output is redirected to file " << _outputFileName << endl; _ngMesh = Ng_NewMesh(); } @@ -3533,8 +3534,9 @@ void NETGENPlugin_NetgenLibWrapper::removeOutputFile() { delete netgen::mycout; netgen::mycout = 0; + netgen::myerr = 0; } SALOMEDS_Tool::RemoveTemporaryFiles( tmpDir.c_str(), aFiles.in(), true ); - cout << "NOTE: netgen output log REMOVED " << _outputFileName << endl; + cout << "NOTE: netgen output log was REMOVED " << _outputFileName << endl; } -- 2.39.2