59 maxErrors_(maxErrors),
100 const bool useStderr =
116 osptr = (useStderr ? &
Serr : &
Sout);
122 osptr = (useStderr ? &
Perr : &
Pout);
127 (*osptr) <<
title_.c_str();
133 <<
"Too many errors..." 148 Pout<<
"** messageStream with comm:" << communicator <<
endl;
154 return this->stream();
163 return this->stream().stdStream();
171 const std::string& functionName
176 if (!functionName.empty())
179 <<
" From " << functionName.c_str() <<
nl;
188 const int afterVersion,
189 const char* functionName,
190 const char* sourceFileName,
191 const int sourceFileLineNumber
194 OSstream&
os = this->stream();
206 - (12 * (afterVersion/100) + (afterVersion % 100))
210 <<
">>> DEPRECATED after version " << afterVersion;
212 if (afterVersion < 1000)
215 os <<
". This is very old! <<<" <<
nl;
219 os <<
". This is about " << months <<
" months old. <<<" <<
nl;
227 os <<
" From " << functionName <<
nl 228 <<
" in file " << sourceFileName
229 <<
" at line " << sourceFileLineNumber <<
nl;
239 const char* functionName,
240 const char* sourceFileName,
241 const int sourceFileLineNumber
247 <<
" From " << functionName <<
nl 248 <<
" in file " << sourceFileName
249 <<
" at line " << sourceFileLineNumber <<
nl 258 const std::string& functionName,
259 const char* sourceFileName,
260 const int sourceFileLineNumber
265 functionName.c_str(),
274 const char* functionName,
275 const char* sourceFileName,
276 const int sourceFileLineNumber,
277 const std::string& ioFileName,
278 const label ioStartLineNumber,
279 const label ioEndLineNumber
285 <<
" From " << functionName <<
nl 286 <<
" in file " << sourceFileName
287 <<
" at line " << sourceFileLineNumber <<
nl 288 <<
" Reading \"" << ioFileName.c_str() <<
'"';
290 if (ioStartLineNumber >= 0)
292 os <<
" at line " << ioStartLineNumber;
294 if (ioStartLineNumber < ioEndLineNumber)
296 os <<
" to " << ioEndLineNumber;
308 const char* functionName,
309 const char* sourceFileName,
310 const int sourceFileLineNumber,
318 sourceFileLineNumber,
319 ioStream.relativeName(),
320 ioStream.lineNumber(),
328 const char* functionName,
329 const char* sourceFileName,
330 const int sourceFileLineNumber,
338 sourceFileLineNumber,
354 "--> FOAM Warning : ",
360 "--> 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
Communicator for all ranks. May differ from commGlobal() 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...
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)
const int api
OpenFOAM api number (integer) corresponding to the value of OPENFOAM at the time of compilation...
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 & deprecated(const int afterVersion, const char *functionName, const char *sourceFileName, const int sourceFileLineNumber=0)
Report deprecation (after specified API version) with 'From function-name, source file...
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)
True if process corresponds to the master rank in the communicator.
OSstream Serr
OSstream wrapped stderr (std::cerr)
messageStream Info
Information stream (stdout output on master, null elsewhere)
static void printStack(Ostream &os, int size=-1)
Helper function to print a stack, with optional upper limit.
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.