ENH: suppress Info output for some cases (issue #722, #893)

- add additional control via a Foam::infoDetailLevel flag, which is
  supported by a 'DetailLevel' macro.  Eg,

      DetailLevel << "some information" << nl

- When infoDetailLevel is zero, the stdout for all Foam::system() calls
  are also redirected to stderr to prevent child output from
  appearing on the parent.

- close stdin before exec in system call.
This commit is contained in:
Mark Olesen
2018-06-22 12:26:33 +02:00
parent 83c9d3b287
commit 6390c18381
20 changed files with 260 additions and 211 deletions

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -350,7 +350,8 @@ void Foam::codedBase::updateLibrary
return;
}
Info<< "Using dynamicCode for " << this->description().c_str()
DetailInfo
<< "Using dynamicCode for " << this->description().c_str()
<< " at line " << dict.startLineNumber()
<< " in " << dict.name() << endl;