From: akl Date: Thu, 11 Jul 2013 10:21:33 +0000 (+0000) Subject: Additional fix for 0022170: [CEA 704] Redirect NETGEN outup in a log file: X-Git-Tag: V7_3_0a1~41 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a0570677a1250208d2495a2b2fe95dac3d499f17;p=plugins%2Fnetgenplugin.git 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. --- 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; }