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

@ -124,7 +124,7 @@ int main(int argc, char *argv[])
{
if (nProcs)
{
// Info<< "Remove " << timeDirs.size()
// Serr<< "Remove " << timeDirs.size()
// << " processor time directories" << nl;
forAllReverse(timeDirs, timei)
@ -153,7 +153,7 @@ int main(int argc, char *argv[])
}
else
{
// Info<< "Remove " << timeDirs.size()
// Serr<< "Remove " << timeDirs.size()
// << " time directories" << nl;
forAllReverse(timeDirs, timei)

View File

@ -122,7 +122,7 @@ int main(int argc, char *argv[])
const scalar scaling = args.lookupOrDefault<scalar>("scale", -1);
if (scaling > 0)
{
Info<< " -scale " << scaling << nl;
DetailInfo << " -scale " << scaling << nl;
surf.scalePoints(scaling);
}