Go to the documentation of this file.
55 maxErrors_(maxErrors),
75 Pout<<
"** messageStream with comm:" << communicator <<
endl;
92 const string& functionName
98 <<
" From " << functionName.c_str() <<
nl;
106 const char* functionName,
107 const char* sourceFileName,
108 const int sourceFileLineNumber
114 <<
" From " << functionName <<
nl
115 <<
" in file " << sourceFileName
116 <<
" at line " << sourceFileLineNumber <<
endl
125 const string& functionName,
126 const char* sourceFileName,
127 const int sourceFileLineNumber
132 functionName.c_str(),
141 const char* functionName,
142 const char* sourceFileName,
143 const int sourceFileLineNumber,
144 const string& ioFileName,
145 const label ioStartLineNumber,
146 const label ioEndLineNumber
152 <<
" From " << functionName <<
nl
153 <<
" in file " << sourceFileName
154 <<
" at line " << sourceFileLineNumber <<
nl
155 <<
" Reading " << ioFileName;
157 if (ioStartLineNumber >= 0)
159 os <<
" at line " << ioStartLineNumber;
161 if (ioStartLineNumber < ioEndLineNumber)
163 os <<
" to " << ioEndLineNumber;
175 const char* functionName,
176 const char* sourceFileName,
177 const int sourceFileLineNumber,
185 sourceFileLineNumber,
187 ioStream.lineNumber(),
195 const char* functionName,
196 const char* sourceFileName,
197 const int sourceFileLineNumber,
205 sourceFileLineNumber,
220 || severity_ == WARNING
221 || severity_ == INFO_STDERR
233 const bool useStderr =
235 (severity_ == INFO_STDERR)
247 if (!title().empty())
249 os << title().c_str();
252 if (maxErrors_ && (++errorCount_ >= maxErrors_))
274 "--> FOAM Warning : ",
280 "--> 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.
Class to handle messaging in a simple, consistent stream-based manner.
int debugSwitch(const char *name, const int deflt=0)
Lookup debug switch or add default value.
errorSeverity
Message type, or error severity flags.
OSstream & masterStream(const label communicator)
Convert to OSstream.
static bool & parRun()
Test if this a parallel run, or allow modify access.
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 (uses stderr - output is on the master only)
const fileName & name() const
The dictionary name.
messageStream Info
Information stream (uses stdout - output is on the master only)
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,...
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)
A serious problem - eg, data corruption.
messageStream(const string &title, const errorSeverity severity, const int maxErrors=0)
Construct from components.
OFstream Snull
Global predefined null output stream "/dev/null".
OSstream Sout
OSstream wrapped stdout (std::cout)
General information output.
Information, but on stderr.