58 maxErrors_(maxErrors),
99 const bool useStderr =
115 osptr = (useStderr ? &
Serr : &
Sout);
121 osptr = (useStderr ? &
Perr : &
Pout);
126 (*osptr) <<
title_.c_str();
132 <<
"Too many errors..." 147 Pout<<
"** messageStream with comm:" << communicator <<
endl;
153 return this->stream();
162 return this->stream().stdStream();
170 const string& functionName
175 if (!functionName.empty())
178 <<
" From " << functionName.c_str() <<
nl;
187 const char* functionName,
188 const char* sourceFileName,
189 const int sourceFileLineNumber
192 OSstream&
os = this->stream();
195 <<
" From " << functionName <<
nl 196 <<
" in file " << sourceFileName
197 <<
" at line " << sourceFileLineNumber <<
endl 206 const string& functionName,
207 const char* sourceFileName,
208 const int sourceFileLineNumber
213 functionName.c_str(),
222 const char* functionName,
223 const char* sourceFileName,
224 const int sourceFileLineNumber,
225 const string& ioFileName,
226 const label ioStartLineNumber,
227 const label ioEndLineNumber
233 <<
" From " << functionName <<
nl 234 <<
" in file " << sourceFileName
235 <<
" at line " << sourceFileLineNumber <<
nl 236 <<
" Reading " << ioFileName;
238 if (ioStartLineNumber >= 0)
240 os <<
" at line " << ioStartLineNumber;
242 if (ioStartLineNumber < ioEndLineNumber)
244 os <<
" to " << ioEndLineNumber;
256 const char* functionName,
257 const char* sourceFileName,
258 const int sourceFileLineNumber,
266 sourceFileLineNumber,
267 ioStream.relativeName(),
268 ioStream.lineNumber(),
276 const char* functionName,
277 const char* sourceFileName,
278 const int sourceFileLineNumber,
286 sourceFileLineNumber,
302 "--> FOAM Warning : ",
308 "--> FOAM Serious Error : ",
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
prefixOSstream Perr
OSstream wrapped stderr (std::cerr) with parallel prefix.
Generic output stream using a standard (STL) stream.
label endLineNumber() const
Return line number of last token in dictionary.
messageStream InfoErr
Information stream (stderr output on master, null elsewhere)
errorSeverity
Message type, error severity flags.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
int infoDetailLevel
Global for selective suppression of Info output.
constexpr char nl
The newline '\n' character (0x0a)
std::ostream & stdStream()
Return std::ostream for output operations.
A serious problem - eg, data corruption.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool & parRun() noexcept
Test if this a parallel run.
OFstream Snull
Global predefined null output stream "/dev/null".
Handle output messages in a simple, consistent stream-based manner.
static label worldComm
Default world communicator (all processors). May differ from globalComm if local worlds are in use...
int infoSwitch(const char *name, const int deflt=0)
Lookup info switch or add default value.
static int redirect
The output redirection of messages.
messageStream SeriousError
Error stream (stdout output on all processes), with additional 'FOAM Serious Error' header text...
static void printStack(Ostream &os)
Helper function to print a stack.
OSstream Sout
OSstream wrapped stdout (std::cout)
static label warnComm
Debugging: warn for use of any communicator differing from warnComm.
errorManip< error > abort(error &err)
OSstream & stream(OSstream *alternative=nullptr)
Return OSstream for output operations. Use the alternative stream for serial-only output if it is a v...
OBJstream os(runTime.globalPath()/outputName)
fileName relativeName(const bool caseTag=false) const
The dictionary name relative to the case.
messageStream Warning
Warning stream (stdout output on master, null elsewhere), with additional 'FOAM Warning' header text...
OSstream & masterStream(const label communicator)
Return OSstream for output operations on the master process only, Snull on other processes.
An IOstream is an abstract base class for all input/output systems; be they streams, files, token lists etc.
static bool master(const label communicator=worldComm)
Am I the master rank.
OSstream Serr
OSstream wrapped stderr (std::cerr)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Warning of possible problem.
messageStream(const string &title, const errorSeverity severity, const int maxErrors=0)
Construct from components.
General information output (stderr)
A class for handling character strings derived from std::string.
General information output (stdout)
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
static int level
The output level (verbosity) of messages.
label startLineNumber() const
Return line number of first token in dictionary.