Go to the documentation of this file.
55 maxErrors_(maxErrors),
80 || severity_ == INFO_STDERR
81 || severity_ == WARNING
96 const bool useStderr =
99 || (severity_ == INFO_STDERR)
112 osptr = (useStderr ? &
Serr : &
Sout);
118 osptr = (useStderr ? &
Perr : &
Pout);
123 (*osptr) << title_.c_str();
126 if (maxErrors_ && (++errorCount_ >= maxErrors_))
129 <<
"Too many errors..."
144 Pout<<
"** messageStream with comm:" << communicator <<
endl;
150 return this->stream();
159 return this->stream().stdStream();
167 const string& functionName
172 if (!functionName.empty())
175 <<
" From " << functionName.c_str() <<
nl;
184 const char* functionName,
185 const char* sourceFileName,
186 const int sourceFileLineNumber
192 <<
" From " << functionName <<
nl
193 <<
" in file " << sourceFileName
194 <<
" at line " << sourceFileLineNumber <<
endl
203 const string& functionName,
204 const char* sourceFileName,
205 const int sourceFileLineNumber
210 functionName.c_str(),
219 const char* functionName,
220 const char* sourceFileName,
221 const int sourceFileLineNumber,
222 const string& ioFileName,
223 const label ioStartLineNumber,
224 const label ioEndLineNumber
230 <<
" From " << functionName <<
nl
231 <<
" in file " << sourceFileName
232 <<
" at line " << sourceFileLineNumber <<
nl
233 <<
" Reading " << ioFileName;
235 if (ioStartLineNumber >= 0)
237 os <<
" at line " << ioStartLineNumber;
239 if (ioStartLineNumber < ioEndLineNumber)
241 os <<
" to " << ioEndLineNumber;
253 const char* functionName,
254 const char* sourceFileName,
255 const int sourceFileLineNumber,
263 sourceFileLineNumber,
265 ioStream.lineNumber(),
273 const char* functionName,
274 const char* sourceFileName,
275 const int sourceFileLineNumber,
283 sourceFileLineNumber,
299 "--> FOAM Warning : ",
305 "--> FOAM Serious Error : ",
Warning of possible problem.
static label warnComm
Debugging: warn for use of any communicator differing from warnComm.
static void printStack(Ostream &os)
Helper function to print a stack.
Handle output messages in a simple, consistent stream-based manner.
errorSeverity
Message type, error severity flags.
OSstream & masterStream(const label communicator)
static int level
The output level (verbosity) of messages.
static int redirect
The output redirection of messages.
An IOstream is an abstract base class for all input/output systems; be they streams,...
static bool master(const label communicator=worldComm)
Am I the master process.
Ostream & endl(Ostream &os)
Add newline and flush stream.
OSstream Serr
OSstream wrapped stderr (std::cerr)
A class for handling character strings derived from std::string.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
messageStream InfoErr
Information stream (stderr output on master, null elsewhere)
int infoSwitch(const char *name, const int deflt=0)
Lookup info switch or add default value.
OSstream & stream(OSstream *alternative=nullptr)
messageStream Info
Information stream (stdout output on master, null elsewhere)
fileName relativeName(const bool caseTag=false) const
The dictionary name relative to the case.
label startLineNumber() const
Return line number of first token in dictionary.
label endLineNumber() const
Return line number of last token in dictionary.
Generic output stream using a standard (STL) stream.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
errorManip< error > abort(error &err)
int infoDetailLevel
Global for selective suppression of Info output.
prefixOSstream Perr
OSstream wrapped stderr (std::cerr) with parallel prefix.
messageStream SeriousError
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static label worldComm
Default communicator (all processors)
static bool & parRun() noexcept
Test if this a parallel run.
A serious problem - eg, data corruption.
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
messageStream(const string &title, const errorSeverity severity, const int maxErrors=0)
Construct from components.
OFstream Snull
Global predefined null output stream "/dev/null".
std::ostream & stdStream()
Return std::ostream for output operations.
OSstream Sout
OSstream wrapped stdout (std::cout)
General information output (stdout)
General information output (stderr)