Commit 06ae8dca authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: output Warning messages to stderr when banners are suppressed (#1713)

parent c47937e3
......@@ -212,11 +212,20 @@ Foam::messageStream::operator Foam::OSstream&()
{
if (level)
{
// stderr instead of stdout
// - INFO_STDERR
// - WARNING when infoDetailLevel == 0
const bool useSerr =
(
(severity_ == INFO_STDERR)
|| (severity_ == WARNING && Foam::infoDetailLevel == 0)
);
const bool collect =
(
severity_ == INFO
|| severity_ == INFO_STDERR
|| severity_ == WARNING
|| useSerr
);
......@@ -226,10 +235,11 @@ Foam::messageStream::operator Foam::OSstream&()
return Snull;
}
OSstream& os =
(
(collect || !Pstream::parRun())
? ((severity_ == INFO_STDERR) ? Serr : Sout)
? (useSerr ? Serr : Sout)
: Pout
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment